diff --git a/src/main/java/com/totopia/server/modules/game/entity/BettingHistoryEntity.java b/src/main/java/com/totopia/server/modules/game/entity/BettingHistoryEntity.java new file mode 100644 index 0000000..b068f27 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/game/entity/BettingHistoryEntity.java @@ -0,0 +1,59 @@ +package com.totopia.server.modules.game.entity; + +import com.totopia.server.commons.data.entity.DateAuditEntity; +import com.totopia.server.modules.game.type.BettingResultName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "bet_history") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class BettingHistoryEntity extends DateAuditEntity { + + @Id + @GeneratedValue(generator = "bet_history_generator") + @SequenceGenerator(name = "bet_history_generator", sequenceName = "bet_history_sequence", initialValue = 1) + private Long id; + + @Basic + @Column(name = "league_id", nullable = false) + private Long league; + + @Basic + @Column(name = "sports_event_id", nullable = false) + private Long sportsEvent; + + @Basic + @Column(name = "user_id", nullable = false) + private Long user; + + @Basic + @Column(name = "money_log_id", nullable = false) + private Long moneyLog; + + @Basic + @Column(name = "betting_money", nullable = false) + private Integer bettingMoney; + + @Basic + @Column(name = "predict_money", nullable = false) + private Integer predictMoney; + + @Basic + @Column(name = "real_money", nullable = true) + private Integer realMoney; + + @Basic + @Column(name = "betting_result", nullable = false, length = 100) + private BettingResultName bettingResult; + +} diff --git a/src/main/java/com/totopia/server/modules/game/type/BettingResultName.java b/src/main/java/com/totopia/server/modules/game/type/BettingResultName.java new file mode 100644 index 0000000..1f4db29 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/game/type/BettingResultName.java @@ -0,0 +1,7 @@ +package com.totopia.server.modules.game.type; + +public enum BettingResultName { + BETTING_RESULT_WINNING, // 당첨 + BETTING_RESULT_FAILURE, // 실패 + BETTING_RESULT_INVALIDITY // 무효 +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/PopupConfig.java b/src/main/java/com/totopia/server/modules/info/entity/PopupConfig.java new file mode 100644 index 0000000..5c9e039 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/PopupConfig.java @@ -0,0 +1,53 @@ +package com.totopia.server.modules.info.entity; + +import com.totopia.server.commons.data.entity.UserDateAuditEntity; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "popup_config") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class PopupConfig extends UserDateAuditEntity { + + @Id + @GeneratedValue(generator = "bet_history_generator") + @SequenceGenerator(name = "bet_history_generator", sequenceName = "bet_history_sequence", initialValue = 1) + private Long id; + + @Column(name = "thumbnail", nullable = true, length = 200) + private String thumbnail; + + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "img_width", nullable = false) + private Short imgWidth; + + @Basic + @Column(name = "img_height", nullable = false) + private Short imgHeight; + + @Basic + @Column(name = "img_x", nullable = false) + private Short imgX; + + @Basic + @Column(name = "img_y", nullable = false) + private Short imgY; + + @Basic + @Column(name = "open_status", nullable = false) + private Boolean openStatus = false; + + +} diff --git a/src/main/java/com/totopia/server/modules/info/type/EffectName.java b/src/main/java/com/totopia/server/modules/info/type/EffectName.java new file mode 100644 index 0000000..a0246c1 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/type/EffectName.java @@ -0,0 +1,10 @@ +package com.totopia.server.modules.info.type; + +public enum EffectName { + EFFECT_LIFT_TO_RIGHT, + EFFECT_RIGHT_TO_LEFT, + EFFECT_TOP_TO_BOTTOM, + EFFECT_BOTTOM_TO_TOP, + EFFECT_COUNTERCLOCKWISE, + EFFECT_CLOCKWISE, +} diff --git a/src/main/java/com/totopia/server/modules/user/entity/BankEntity.java b/src/main/java/com/totopia/server/modules/user/entity/BankEntity.java index fc774de..0fe4b6a 100644 --- a/src/main/java/com/totopia/server/modules/user/entity/BankEntity.java +++ b/src/main/java/com/totopia/server/modules/user/entity/BankEntity.java @@ -27,17 +27,13 @@ public class BankEntity extends DateAuditEntity { @Column(name = "user_id", nullable = false) private Long userId; - @Basic - @Column(name = "bank_account_id", nullable = false) - private Long bankAccountId; - @Basic @Column(name = "name", nullable = false, length = 100) private String name; @Basic - @Column(name = "number", nullable = false, length = 100) - private String number; + @Column(name = "account_number", nullable = false, length = 100) + private String accountNumber; @Basic @Column(name = "holder", nullable = false, length = 100) @@ -51,6 +47,7 @@ public class BankEntity extends DateAuditEntity { @Column(name = "status", nullable = false, length = 100) private StatusName status; - - + @Basic + @Column(name = "descriptions", nullable = true, length = 1000) + private String descriptions; } diff --git a/src/main/java/com/totopia/server/modules/user/entity/DepositEntity.java b/src/main/java/com/totopia/server/modules/user/entity/DepositEntity.java index df1400d..513f142 100644 --- a/src/main/java/com/totopia/server/modules/user/entity/DepositEntity.java +++ b/src/main/java/com/totopia/server/modules/user/entity/DepositEntity.java @@ -37,8 +37,8 @@ public class DepositEntity extends DateAuditEntity implements Serializable { private Long bank; @Basic - @Column(name = "bank_account", nullable = false) - private Short bankAccount; + @Column(name = "deposit_account", nullable = false) + private String depositAccount; @Basic @Enumerated(EnumType.STRING) diff --git a/src/main/java/com/totopia/server/modules/user/entity/PayDoneEntity.java b/src/main/java/com/totopia/server/modules/user/entity/PayDoneEntity.java index c87be85..2c2e5bf 100644 --- a/src/main/java/com/totopia/server/modules/user/entity/PayDoneEntity.java +++ b/src/main/java/com/totopia/server/modules/user/entity/PayDoneEntity.java @@ -5,6 +5,7 @@ import lombok.*; import lombok.experimental.SuperBuilder; import javax.persistence.*; +import java.util.Date; @Entity(name = "pay_done") @Data @@ -28,4 +29,17 @@ public class PayDoneEntity extends UserDateAuditEntity { @Column(name = "settle_user_id", nullable = false) private Long settleUser; + @Basic + @Column(name = "price", nullable = false) + private Integer price; + + @Basic + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "start_date", nullable = false) + private Date startDate; + + @Basic + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "end_date", nullable = false) + private Date endDate; } diff --git a/src/main/java/com/totopia/server/modules/user/entity/WithdrawEntity.java b/src/main/java/com/totopia/server/modules/user/entity/WithdrawEntity.java index 18ee1a7..8c54fd1 100644 --- a/src/main/java/com/totopia/server/modules/user/entity/WithdrawEntity.java +++ b/src/main/java/com/totopia/server/modules/user/entity/WithdrawEntity.java @@ -35,10 +35,6 @@ public class WithdrawEntity extends DateAuditEntity implements Serializable { @Column(name = "bank_id", nullable = false) private Long bank; - @Basic - @Column(name = "bank_account", nullable = false) - private Short bankAccount; - @Basic @Enumerated(EnumType.STRING) @Column(name = "status", length = 60) diff --git a/src/test/java/com/totopia/server/modules/user/repository/BankRepositoryTest.java b/src/test/java/com/totopia/server/modules/user/repository/BankRepositoryTest.java index 81718b9..a562e25 100644 --- a/src/test/java/com/totopia/server/modules/user/repository/BankRepositoryTest.java +++ b/src/test/java/com/totopia/server/modules/user/repository/BankRepositoryTest.java @@ -50,17 +50,17 @@ public class BankRepositoryTest { case 0: bankAccount.setName("국민은행"); bankAccount.setHolder("예금주1"); - bankAccount.setNumber("123-422-23112"); + bankAccount.setAccountNumber("123-422-23112"); break; case 1: bankAccount.setName("우리은행"); bankAccount.setHolder("예금주2"); - bankAccount.setNumber("321-555-3312-21"); + bankAccount.setAccountNumber("321-555-3312-21"); break; case 2: bankAccount.setName("기업은행"); bankAccount.setHolder("예금주3"); - bankAccount.setNumber("832-2392-2392-29829"); + bankAccount.setAccountNumber("832-2392-2392-29829"); break; } idx++; @@ -81,17 +81,17 @@ public class BankRepositoryTest { case 0: account.setName("국민은행"); account.setHolder("예금주1"); - account.setNumber("123-422-23112"); + account.setAccountNumber("123-422-23112"); break; case 1: account.setName("우리은행"); account.setHolder("예금주2"); - account.setNumber("321-555-3312-21"); + account.setAccountNumber("321-555-3312-21"); break; case 2: account.setName("기업은행"); account.setHolder("예금주3"); - account.setNumber("832-2392-2392-29829"); + account.setAccountNumber("832-2392-2392-29829"); break; } idx++; diff --git a/src/test/java/com/totopia/server/modules/user/repository/DepositRepositoryTest.java b/src/test/java/com/totopia/server/modules/user/repository/DepositRepositoryTest.java index dd27604..337e9c4 100644 --- a/src/test/java/com/totopia/server/modules/user/repository/DepositRepositoryTest.java +++ b/src/test/java/com/totopia/server/modules/user/repository/DepositRepositoryTest.java @@ -40,7 +40,7 @@ public class DepositRepositoryTest { public void insertTest() throws Exception { DepositEntity en = DepositEntity.builder() .price(10000) - .bankAccount((short) 1) + .depositAccount("192-921-021-22") .approveUser(accounts.get(0).getId()) .bank(accounts.get(2).getId()) .status(BankingName.BANKING_WAITING) diff --git a/src/test/java/com/totopia/server/modules/user/repository/WithdrawRepositoryTest.java b/src/test/java/com/totopia/server/modules/user/repository/WithdrawRepositoryTest.java index 2d0bffc..f6e2485 100644 --- a/src/test/java/com/totopia/server/modules/user/repository/WithdrawRepositoryTest.java +++ b/src/test/java/com/totopia/server/modules/user/repository/WithdrawRepositoryTest.java @@ -37,7 +37,7 @@ public class WithdrawRepositoryTest { public void insertTest() throws Exception { WithdrawEntity en = WithdrawEntity.builder() .price(10000) - .bankAccount((short) 2) + .approveUser(accounts.get(0).getId()) .bank(accounts.get(2).getId()) .status(BankingName.BANKING_WAITING)