Skip to content

Commit

Permalink
Type: 시작안한 챌린지 목록 조회 - NoOffset page 적용
Browse files Browse the repository at this point in the history
[Feat] 시작안한 챌린지 목록 조회 - NoOffset page적용
  • Loading branch information
pingowl authored Nov 6, 2023
2 parents 2978047 + 18fd972 commit c80126a
Show file tree
Hide file tree
Showing 16 changed files with 645 additions and 5 deletions.
35 changes: 35 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '3.1.3'
Expand Down Expand Up @@ -32,6 +39,7 @@ dependencyManagement {

}


dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
Expand All @@ -47,6 +55,10 @@ dependencies {

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
//JUnit4 추가
testImplementation("org.junit.vintage:junit-vintage-engine") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}

// jwt
implementation group: 'com.auth0', name: 'java-jwt', version: '3.10.2'
Expand All @@ -68,5 +80,28 @@ dependencies {
implementation platform('software.amazon.awssdk:bom:2.20.56')
implementation 'software.amazon.awssdk:s3'
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

// Querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

// Querydsl 설정부
def generated = 'src/main/generated'

// querydsl QClass 파일 생성 위치를 지정
tasks.withType(JavaCompile) {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}

// java source set 에 querydsl QClass 위치 추가
sourceSets {
main.java.srcDirs += [ generated ]
}

// gradle clean 시에 QClass 디렉토리 삭제
clean {
delete file(generated)
}
39 changes: 39 additions & 0 deletions src/main/generated/igoMoney/BE/common/entity/QBaseEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package igoMoney.BE.common.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;


/**
* QBaseEntity is a Querydsl query type for BaseEntity
*/
@Generated("com.querydsl.codegen.DefaultSupertypeSerializer")
public class QBaseEntity extends EntityPathBase<BaseEntity> {

private static final long serialVersionUID = -1350694424L;

public static final QBaseEntity baseEntity = new QBaseEntity("baseEntity");

public final DateTimePath<java.time.LocalDateTime> createdDate = createDateTime("createdDate", java.time.LocalDateTime.class);

public final DateTimePath<java.time.LocalDateTime> modifiedDate = createDateTime("modifiedDate", java.time.LocalDateTime.class);

public QBaseEntity(String variable) {
super(BaseEntity.class, forVariable(variable));
}

public QBaseEntity(Path<? extends BaseEntity> path) {
super(path.getType(), path.getMetadata());
}

public QBaseEntity(PathMetadata metadata) {
super(BaseEntity.class, metadata);
}

}

70 changes: 70 additions & 0 deletions src/main/generated/igoMoney/BE/domain/QChallenge.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package igoMoney.BE.domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QChallenge is a Querydsl query type for Challenge
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QChallenge extends EntityPathBase<Challenge> {

private static final long serialVersionUID = 563322277L;

public static final QChallenge challenge = new QChallenge("challenge");

public final igoMoney.BE.common.entity.QBaseEntity _super = new igoMoney.BE.common.entity.QBaseEntity(this);

public final NumberPath<Integer> categoryId = createNumber("categoryId", Integer.class);

public final ListPath<ChallengeUser, QChallengeUser> challengeUsers = this.<ChallengeUser, QChallengeUser>createList("challengeUsers", ChallengeUser.class, QChallengeUser.class, PathInits.DIRECT2);

public final StringPath content = createString("content");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;

public final DatePath<java.time.LocalDate> endDate = createDate("endDate", java.time.LocalDate.class);

public final NumberPath<Long> id = createNumber("id", Long.class);

public final NumberPath<Long> leaderId = createNumber("leaderId", Long.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate;

public final ListPath<Record, QRecord> records = this.<Record, QRecord>createList("records", Record.class, QRecord.class, PathInits.DIRECT2);

public final DatePath<java.time.LocalDate> startDate = createDate("startDate", java.time.LocalDate.class);

public final StringPath status = createString("status");

public final NumberPath<Integer> targetAmount = createNumber("targetAmount", Integer.class);

public final NumberPath<Integer> term = createNumber("term", Integer.class);

public final StringPath title = createString("title");

public final NumberPath<Long> winnerId = createNumber("winnerId", Long.class);

public QChallenge(String variable) {
super(Challenge.class, forVariable(variable));
}

public QChallenge(Path<? extends Challenge> path) {
super(path.getType(), path.getMetadata());
}

public QChallenge(PathMetadata metadata) {
super(Challenge.class, metadata);
}

}

62 changes: 62 additions & 0 deletions src/main/generated/igoMoney/BE/domain/QChallengeUser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package igoMoney.BE.domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QChallengeUser is a Querydsl query type for ChallengeUser
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QChallengeUser extends EntityPathBase<ChallengeUser> {

private static final long serialVersionUID = -843406576L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QChallengeUser challengeUser = new QChallengeUser("challengeUser");

public final igoMoney.BE.common.entity.QBaseEntity _super = new igoMoney.BE.common.entity.QBaseEntity(this);

public final QChallenge challenge;

//inherited
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;

public final NumberPath<Long> id = createNumber("id", Long.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate;

public final QUser user;

public QChallengeUser(String variable) {
this(ChallengeUser.class, forVariable(variable), INITS);
}

public QChallengeUser(Path<? extends ChallengeUser> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QChallengeUser(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QChallengeUser(PathMetadata metadata, PathInits inits) {
this(ChallengeUser.class, metadata, inits);
}

public QChallengeUser(Class<? extends ChallengeUser> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.challenge = inits.isInitialized("challenge") ? new QChallenge(forProperty("challenge")) : null;
this.user = inits.isInitialized("user") ? new QUser(forProperty("user")) : null;
}

}

65 changes: 65 additions & 0 deletions src/main/generated/igoMoney/BE/domain/QNotification.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package igoMoney.BE.domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QNotification is a Querydsl query type for Notification
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QNotification extends EntityPathBase<Notification> {

private static final long serialVersionUID = 1979697257L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QNotification notification = new QNotification("notification");

public final igoMoney.BE.common.entity.QBaseEntity _super = new igoMoney.BE.common.entity.QBaseEntity(this);

public final BooleanPath checked = createBoolean("checked");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath message = createString("message");

//inherited
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate;

public final StringPath title = createString("title");

public final QUser user;

public QNotification(String variable) {
this(Notification.class, forVariable(variable), INITS);
}

public QNotification(Path<? extends Notification> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QNotification(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QNotification(PathMetadata metadata, PathInits inits) {
this(Notification.class, metadata, inits);
}

public QNotification(Class<? extends Notification> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.user = inits.isInitialized("user") ? new QUser(forProperty("user")) : null;
}

}

74 changes: 74 additions & 0 deletions src/main/generated/igoMoney/BE/domain/QRecord.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package igoMoney.BE.domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QRecord is a Querydsl query type for Record
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QRecord extends EntityPathBase<Record> {

private static final long serialVersionUID = -1181179313L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QRecord record = new QRecord("record");

public final igoMoney.BE.common.entity.QBaseEntity _super = new igoMoney.BE.common.entity.QBaseEntity(this);

public final QChallenge challenge;

public final StringPath content = createString("content");

public final NumberPath<Integer> cost = createNumber("cost", Integer.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;

public final DatePath<java.time.LocalDate> date = createDate("date", java.time.LocalDate.class);

public final BooleanPath hide = createBoolean("hide");

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath image = createString("image");

//inherited
public final DateTimePath<java.time.LocalDateTime> modifiedDate = _super.modifiedDate;

public final StringPath title = createString("title");

public final QUser user;

public QRecord(String variable) {
this(Record.class, forVariable(variable), INITS);
}

public QRecord(Path<? extends Record> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QRecord(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QRecord(PathMetadata metadata, PathInits inits) {
this(Record.class, metadata, inits);
}

public QRecord(Class<? extends Record> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.challenge = inits.isInitialized("challenge") ? new QChallenge(forProperty("challenge")) : null;
this.user = inits.isInitialized("user") ? new QUser(forProperty("user")) : null;
}

}

Loading

0 comments on commit c80126a

Please sign in to comment.