입출금 패키지 모델 생성
This commit is contained in:
parent
20d56b9032
commit
2a8504e63a
|
@ -0,0 +1,36 @@
|
||||||
|
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 = "reply")
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ReplyEntity extends UserDateAuditEntity {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(generator = "reply_generator")
|
||||||
|
@SequenceGenerator(name = "reply_generator", sequenceName = "reply_sequence", initialValue = 1)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Basic
|
||||||
|
@Column(name = "free_board_id", nullable = false)
|
||||||
|
private Long freeBoard;
|
||||||
|
|
||||||
|
@Basic
|
||||||
|
@Column(name = "title", nullable = true, length = 200)
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@Basic
|
||||||
|
@Column(name = "contents", nullable = true, length = 2000)
|
||||||
|
private String contents;
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.totopia.server.modules.user.entity;
|
package com.totopia.server.modules.moneys.entity;
|
||||||
|
|
||||||
import com.totopia.server.commons.data.entity.DateAuditEntity;
|
import com.totopia.server.commons.data.entity.DateAuditEntity;
|
||||||
import com.totopia.server.modules.user.type.StatusName;
|
import com.totopia.server.modules.user.type.StatusName;
|
|
@ -1,7 +1,8 @@
|
||||||
package com.totopia.server.modules.user.entity;
|
package com.totopia.server.modules.moneys.entity;
|
||||||
|
|
||||||
import com.totopia.server.commons.data.entity.DateAuditEntity;
|
import com.totopia.server.commons.data.entity.DateAuditEntity;
|
||||||
import com.totopia.server.modules.user.type.BankingName;
|
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
||||||
|
import com.totopia.server.modules.moneys.type.BankingName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -17,7 +18,11 @@ import java.io.Serializable;
|
||||||
@ToString
|
@ToString
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
public class DepositEntity extends DateAuditEntity implements Serializable {
|
@AttributeOverrides({
|
||||||
|
@AttributeOverride(name = "updatedBy", column = @Column(name = "approve_admin_id")),
|
||||||
|
@AttributeOverride(name = "updatedAt", column = @Column(name = "confirm_date")),
|
||||||
|
})
|
||||||
|
public class DepositEntity extends UserDateAuditEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(generator = "deposit_generator")
|
@GeneratedValue(generator = "deposit_generator")
|
||||||
|
@ -29,16 +34,16 @@ public class DepositEntity extends DateAuditEntity implements Serializable {
|
||||||
private Integer price;
|
private Integer price;
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
@Column(name = "approve_user_id", nullable = false)
|
@Column(name = "bonus", nullable = false)
|
||||||
private Long approveUser;
|
private Integer bonus;
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
@Column(name = "bank_id", nullable = false)
|
@Column(name = "bank_id", nullable = false)
|
||||||
private Long bank;
|
private Long bank;
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
@Column(name = "deposit_account", nullable = false)
|
@Column(name = "bank_accounts_id", nullable = false)
|
||||||
private String depositAccount;
|
private Short bankAccounts;
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
|
@ -1,4 +1,4 @@
|
||||||
package com.totopia.server.modules.user.entity;
|
package com.totopia.server.modules.moneys.entity;
|
||||||
|
|
||||||
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
||||||
import lombok.*;
|
import lombok.*;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.totopia.server.modules.user.entity;
|
package com.totopia.server.modules.moneys.entity;
|
||||||
|
|
||||||
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
||||||
import com.totopia.server.modules.user.type.BankingName;
|
import com.totopia.server.modules.moneys.type.BankingName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.totopia.server.modules.user.entity;
|
package com.totopia.server.modules.moneys.entity;
|
||||||
|
|
||||||
import com.totopia.server.commons.data.entity.DateAuditEntity;
|
import com.totopia.server.commons.data.entity.UserDateAuditEntity;
|
||||||
import com.totopia.server.modules.user.type.BankingName;
|
import com.totopia.server.modules.moneys.type.BankingName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@ import java.io.Serializable;
|
||||||
@ToString
|
@ToString
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
public class WithdrawEntity extends DateAuditEntity implements Serializable {
|
@AttributeOverrides({
|
||||||
|
@AttributeOverride(name = "updatedBy", column = @Column(name = "approve_admin_id")),
|
||||||
|
@AttributeOverride(name = "updatedAt", column = @Column(name = "confirm_date")),
|
||||||
|
})
|
||||||
|
public class WithdrawEntity extends UserDateAuditEntity implements Serializable {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(generator = "withdraw_generator")
|
@GeneratedValue(generator = "withdraw_generator")
|
||||||
@SequenceGenerator(name = "withdraw_generator", sequenceName = "withdraw_sequence", initialValue = 1)
|
@SequenceGenerator(name = "withdraw_generator", sequenceName = "withdraw_sequence", initialValue = 1)
|
||||||
|
@ -27,10 +31,6 @@ public class WithdrawEntity extends DateAuditEntity implements Serializable {
|
||||||
@Column(name = "price", nullable = false)
|
@Column(name = "price", nullable = false)
|
||||||
private Integer price;
|
private Integer price;
|
||||||
|
|
||||||
@Basic
|
|
||||||
@Column(name = "approve_user_id", nullable = false)
|
|
||||||
private Long approveUser;
|
|
||||||
|
|
||||||
@Basic
|
@Basic
|
||||||
@Column(name = "bank_id", nullable = false)
|
@Column(name = "bank_id", nullable = false)
|
||||||
private Long bank;
|
private Long bank;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.moneys.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.BankEntity;
|
import com.totopia.server.modules.moneys.entity.BankEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
public interface BankRepository extends JpaRepository<BankEntity, Long> {
|
public interface BankRepository extends JpaRepository<BankEntity, Long> {
|
|
@ -1,6 +1,6 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.moneys.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.DepositEntity;
|
import com.totopia.server.modules.moneys.entity.DepositEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
public interface DepositRepository extends JpaRepository<DepositEntity, Long> {
|
public interface DepositRepository extends JpaRepository<DepositEntity, Long> {
|
|
@ -1,6 +1,6 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.moneys.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.WithdrawEntity;
|
import com.totopia.server.modules.moneys.entity.WithdrawEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
public interface WithdrawRepository extends JpaRepository<WithdrawEntity, Long> {
|
public interface WithdrawRepository extends JpaRepository<WithdrawEntity, Long> {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.totopia.server.modules.user.type;
|
package com.totopia.server.modules.moneys.type;
|
||||||
|
|
||||||
public enum BankingName {
|
public enum BankingName {
|
||||||
BANKING_WAITING, BANKING_HOLD, BANKING_COMPLETE, BANKING_DEPOSIT, BANKING_WITHDRAW
|
BANKING_WAITING, BANKING_HOLD, BANKING_COMPLETE, BANKING_DEPOSIT, BANKING_WITHDRAW
|
|
@ -1,7 +1,7 @@
|
||||||
package com.totopia.server.modules.user.type;
|
package com.totopia.server.modules.user.type;
|
||||||
|
|
||||||
public enum CommissionName {
|
public enum CommissionName {
|
||||||
COMMISSION_BANKING, // 충환 방식
|
BANKING, // 충환 방식
|
||||||
COMMISSION_BETTING, // 베팅 방식
|
BETTING, // 베팅 방식
|
||||||
COMMISSION_RAFFLE // 낙첨 방식
|
RAFFLE // 낙첨 방식
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.user.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.BankEntity;
|
import com.totopia.server.modules.moneys.entity.BankEntity;
|
||||||
|
import com.totopia.server.modules.moneys.repository.BankRepository;
|
||||||
import com.totopia.server.modules.user.entity.UserEntity;
|
import com.totopia.server.modules.user.entity.UserEntity;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.user.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.BankEntity;
|
import com.totopia.server.modules.moneys.entity.BankEntity;
|
||||||
import com.totopia.server.modules.user.entity.DepositEntity;
|
import com.totopia.server.modules.moneys.entity.DepositEntity;
|
||||||
|
import com.totopia.server.modules.moneys.repository.BankRepository;
|
||||||
|
import com.totopia.server.modules.moneys.repository.DepositRepository;
|
||||||
import com.totopia.server.modules.user.entity.UserEntity;
|
import com.totopia.server.modules.user.entity.UserEntity;
|
||||||
import com.totopia.server.modules.user.type.BankingName;
|
import com.totopia.server.modules.moneys.type.BankingName;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package com.totopia.server.modules.user.repository;
|
package com.totopia.server.modules.user.repository;
|
||||||
|
|
||||||
import com.totopia.server.modules.user.entity.BankEntity;
|
import com.totopia.server.modules.moneys.entity.BankEntity;
|
||||||
|
import com.totopia.server.modules.moneys.repository.BankRepository;
|
||||||
|
import com.totopia.server.modules.moneys.repository.WithdrawRepository;
|
||||||
import com.totopia.server.modules.user.entity.UserEntity;
|
import com.totopia.server.modules.user.entity.UserEntity;
|
||||||
import com.totopia.server.modules.user.entity.WithdrawEntity;
|
import com.totopia.server.modules.moneys.entity.WithdrawEntity;
|
||||||
import com.totopia.server.modules.user.type.BankingName;
|
import com.totopia.server.modules.moneys.type.BankingName;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user