-
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.
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...edollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/Sticker.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,34 @@ | ||
package com.threedollar.domain.sticker; | ||
|
||
|
||
import com.threedollar.domain.AccountType; | ||
import com.threedollar.domain.BaseEntity; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
public class Sticker extends BaseEntity { | ||
|
||
@Column(nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private StickerType stickerType; | ||
|
||
@Column(nullable = false) | ||
private String imageUrl; | ||
|
||
@Column(nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private AccountType accountType; | ||
|
||
@Column(nullable = false) | ||
private String accountId; | ||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...lar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/StickerType.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,17 @@ | ||
package com.threedollar.domain.sticker; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum StickerType { | ||
|
||
POLL("투표"), | ||
|
||
; | ||
private final String description; | ||
|
||
StickerType(String description) { | ||
this.description = description; | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...lar-domain/src/main/java/com/threedollar/domain/sticker/repository/StickerRepository.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,8 @@ | ||
package com.threedollar.domain.sticker.repository; | ||
|
||
import com.threedollar.domain.sticker.Sticker; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface StickerRepository extends JpaRepository<Sticker, Long> { | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
...main/src/main/java/com/threedollar/domain/sticker/repository/StickerRepositoryCustom.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,4 @@ | ||
package com.threedollar.domain.sticker.repository; | ||
|
||
public class StickerRepositoryCustom { | ||
} |