-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #318 from Gamegoo-repo/fix/316
π[Fix] refresh Token λ°κΈ μ νμ μ 보 μμ λ μ§ μ λ°μ΄νΈ λλκ±° μμ
- Loading branch information
Showing
10 changed files
with
139 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/generated/com/gamegoo/domain/member/QRefreshToken.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.gamegoo.domain.member; | ||
|
||
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; | ||
|
||
|
||
/** | ||
* QRefreshToken is a Querydsl query type for RefreshToken | ||
*/ | ||
@Generated("com.querydsl.codegen.DefaultEntitySerializer") | ||
public class QRefreshToken extends EntityPathBase<RefreshToken> { | ||
|
||
private static final long serialVersionUID = -263126930L; | ||
|
||
private static final PathInits INITS = PathInits.DIRECT2; | ||
|
||
public static final QRefreshToken refreshToken1 = new QRefreshToken("refreshToken1"); | ||
|
||
public final com.gamegoo.domain.common.QBaseDateTimeEntity _super = new com.gamegoo.domain.common.QBaseDateTimeEntity(this); | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt; | ||
|
||
public final NumberPath<Long> id = createNumber("id", Long.class); | ||
|
||
public final QMember member; | ||
|
||
public final StringPath refreshToken = createString("refreshToken"); | ||
|
||
//inherited | ||
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt; | ||
|
||
public QRefreshToken(String variable) { | ||
this(RefreshToken.class, forVariable(variable), INITS); | ||
} | ||
|
||
public QRefreshToken(Path<? extends RefreshToken> path) { | ||
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); | ||
} | ||
|
||
public QRefreshToken(PathMetadata metadata) { | ||
this(metadata, PathInits.getFor(metadata, INITS)); | ||
} | ||
|
||
public QRefreshToken(PathMetadata metadata, PathInits inits) { | ||
this(RefreshToken.class, metadata, inits); | ||
} | ||
|
||
public QRefreshToken(Class<? extends RefreshToken> type, PathMetadata metadata, PathInits inits) { | ||
super(type, metadata, inits); | ||
this.member = inits.isInitialized("member") ? new QMember(forProperty("member")) : null; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.gamegoo.domain.member; | ||
|
||
import com.gamegoo.domain.common.BaseDateTimeEntity; | ||
import lombok.*; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@Table(name = "RefreshToken") | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class RefreshToken extends BaseDateTimeEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name="refresh_token_id") | ||
private Long id; | ||
|
||
@Column(name = "refresh_token") | ||
private String refreshToken; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id", nullable = false) | ||
private Member member; | ||
|
||
public void updateRefreshToken(String refreshToken){ | ||
this.refreshToken = refreshToken; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/gamegoo/repository/member/RefreshTokenRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.gamegoo.repository.member; | ||
|
||
import com.gamegoo.domain.member.Member; | ||
import com.gamegoo.domain.member.RefreshToken; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.Optional; | ||
|
||
public interface RefreshTokenRepository extends JpaRepository<RefreshToken,Long> { | ||
Optional<RefreshToken> findByMember(Member member); | ||
|
||
Optional<RefreshToken> findByRefreshToken(String refreshToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters