From 20d56b9032877890a0f67decf1310edf1fead3a1 Mon Sep 17 00:00:00 2001 From: byung eun park Date: Thu, 17 Oct 2019 19:12:51 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=8C=A8=ED=82=A4?= =?UTF-8?q?=EC=A7=80=20=EB=AA=A8=EB=8D=B8=20=EC=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../info/entity/BettingRuleEntity.java | 33 +++++++++++++ .../modules/info/entity/FreeBoardEntity.java | 39 +++++++++++++++ .../modules/info/entity/MainEventEntity.java | 33 +++++++++++++ .../modules/info/entity/MessageEntity.java | 37 +++++++++++++++ .../info/entity/NoticeBoardEntity.java | 44 +++++++++++++++++ .../info/entity/ServiceCenterEntity.java | 47 +++++++++++++++++++ .../modules/info/type/AnswerStateName.java | 9 ++++ .../{EffectName.java => EffectStateName.java} | 2 +- .../modules/info/type/MessageStateName.java | 6 +++ .../modules/info/type/NoticeStateName.java | 6 +++ .../modules/info/type/QuestionStateName.java | 6 +++ 11 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/totopia/server/modules/info/entity/BettingRuleEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/entity/FreeBoardEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/entity/MainEventEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/entity/MessageEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/entity/NoticeBoardEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/entity/ServiceCenterEntity.java create mode 100644 src/main/java/com/totopia/server/modules/info/type/AnswerStateName.java rename src/main/java/com/totopia/server/modules/info/type/{EffectName.java => EffectStateName.java} (86%) create mode 100644 src/main/java/com/totopia/server/modules/info/type/MessageStateName.java create mode 100644 src/main/java/com/totopia/server/modules/info/type/NoticeStateName.java create mode 100644 src/main/java/com/totopia/server/modules/info/type/QuestionStateName.java diff --git a/src/main/java/com/totopia/server/modules/info/entity/BettingRuleEntity.java b/src/main/java/com/totopia/server/modules/info/entity/BettingRuleEntity.java new file mode 100644 index 0000000..9eef0a2 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/BettingRuleEntity.java @@ -0,0 +1,33 @@ +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 = "betting_rule") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class BettingRuleEntity extends UserDateAuditEntity { + + @Id + @GeneratedValue(generator = "betting_rule_generator") + @SequenceGenerator(name = "betting_rule_generator", sequenceName = "betting_rule_sequence", initialValue = 1) + private Short id; + + @Basic + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "contents", nullable = true, length = 2000) + private String contents; +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/FreeBoardEntity.java b/src/main/java/com/totopia/server/modules/info/entity/FreeBoardEntity.java new file mode 100644 index 0000000..6e7fcd8 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/FreeBoardEntity.java @@ -0,0 +1,39 @@ +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 = "free_board") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class FreeBoardEntity extends UserDateAuditEntity { + + @Id + @GeneratedValue(generator = "free_board_generator") + @SequenceGenerator(name = "free_board_generator", sequenceName = "free_board_sequence", initialValue = 1) + private Long id; + + @Basic + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "contents", nullable = true, length = 2000) + private String contents; + + // + @Basic + @Column(name = "attach_id", nullable = true) + private Long attachFile; + +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/MainEventEntity.java b/src/main/java/com/totopia/server/modules/info/entity/MainEventEntity.java new file mode 100644 index 0000000..ad50999 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/MainEventEntity.java @@ -0,0 +1,33 @@ +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 = "main_event") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class MainEventEntity extends UserDateAuditEntity { + + @Id + @GeneratedValue(generator = "main_event_generator") + @SequenceGenerator(name = "main_event_generator", sequenceName = "main_event_sequence", initialValue = 1) + private Short id; + + @Basic + @Column(name = "open_state", nullable = false) + private Boolean openState = false; + + @Basic + @Column(name = "attach_id", nullable = true) + private Long attachFile; +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/MessageEntity.java b/src/main/java/com/totopia/server/modules/info/entity/MessageEntity.java new file mode 100644 index 0000000..abdf6e1 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/MessageEntity.java @@ -0,0 +1,37 @@ +package com.totopia.server.modules.info.entity; + +import com.totopia.server.commons.data.entity.UserDateAuditEntity; +import com.totopia.server.modules.info.type.MessageStateName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "message") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class MessageEntity extends UserDateAuditEntity { + @Id + @GeneratedValue(generator = "message_generator") + @SequenceGenerator(name = "message_generator", sequenceName = "message_sequence", initialValue = 1) + private Long id; + + @Basic + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "contents", nullable = true, length = 2000) + private String contents; + + @Enumerated(EnumType.STRING) + @Column(name = "state_name", length = 60) + private MessageStateName stateName; +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/NoticeBoardEntity.java b/src/main/java/com/totopia/server/modules/info/entity/NoticeBoardEntity.java new file mode 100644 index 0000000..ed1ae98 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/NoticeBoardEntity.java @@ -0,0 +1,44 @@ +package com.totopia.server.modules.info.entity; + +import com.totopia.server.commons.data.entity.UserDateAuditEntity; +import com.totopia.server.modules.info.type.NoticeStateName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "notice_board") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class NoticeBoardEntity extends UserDateAuditEntity { + + @Id + @GeneratedValue(generator = "notice_board_generator") + @SequenceGenerator(name = "notice_board_generator", sequenceName = "notice_board_sequence", initialValue = 1) + private Long id; + + @Basic + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "contents", nullable = true, length = 2000) + private String contents; + + // + @Basic + @Column(name = "attach_id", nullable = true) + private Long attachFile; + + @Enumerated(EnumType.STRING) + @Column(name = "notice_type", length = 60) + private NoticeStateName noticeType; + +} diff --git a/src/main/java/com/totopia/server/modules/info/entity/ServiceCenterEntity.java b/src/main/java/com/totopia/server/modules/info/entity/ServiceCenterEntity.java new file mode 100644 index 0000000..c41d2d0 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/entity/ServiceCenterEntity.java @@ -0,0 +1,47 @@ +package com.totopia.server.modules.info.entity; + +import com.totopia.server.commons.data.entity.UserDateAuditEntity; +import com.totopia.server.modules.info.type.AnswerStateName; +import com.totopia.server.modules.info.type.QuestionStateName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import javax.persistence.*; + +@Entity +@Table(name = "service_center") +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class ServiceCenterEntity extends UserDateAuditEntity { + @Id + @GeneratedValue(generator = "service_center_generator") + @SequenceGenerator(name = "service_center_generator", sequenceName = "service_center_sequence", initialValue = 1) + private Long id; + + @Basic + @Column(name = "title", nullable = true, length = 200) + private String title; + + @Basic + @Column(name = "contents", nullable = true, length = 2000) + private String contents; + + // + @Basic + @Column(name = "attach_id", nullable = true) + private Long attachFile; + + @Enumerated(EnumType.STRING) + @Column(name = "answer_status", length = 60) + private AnswerStateName answerStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "question_status", length = 60) + private QuestionStateName questionStatus; +} diff --git a/src/main/java/com/totopia/server/modules/info/type/AnswerStateName.java b/src/main/java/com/totopia/server/modules/info/type/AnswerStateName.java new file mode 100644 index 0000000..89c69cc --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/type/AnswerStateName.java @@ -0,0 +1,9 @@ +package com.totopia.server.modules.info.type; + +public enum AnswerStateName { + UNANSWERED, + ANSWER_DONE, + CHECKING_USER, + CONFIRMED_USER, + +} diff --git a/src/main/java/com/totopia/server/modules/info/type/EffectName.java b/src/main/java/com/totopia/server/modules/info/type/EffectStateName.java similarity index 86% rename from src/main/java/com/totopia/server/modules/info/type/EffectName.java rename to src/main/java/com/totopia/server/modules/info/type/EffectStateName.java index a0246c1..7b181f8 100644 --- a/src/main/java/com/totopia/server/modules/info/type/EffectName.java +++ b/src/main/java/com/totopia/server/modules/info/type/EffectStateName.java @@ -1,6 +1,6 @@ package com.totopia.server.modules.info.type; -public enum EffectName { +public enum EffectStateName { EFFECT_LIFT_TO_RIGHT, EFFECT_RIGHT_TO_LEFT, EFFECT_TOP_TO_BOTTOM, diff --git a/src/main/java/com/totopia/server/modules/info/type/MessageStateName.java b/src/main/java/com/totopia/server/modules/info/type/MessageStateName.java new file mode 100644 index 0000000..9f9701b --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/type/MessageStateName.java @@ -0,0 +1,6 @@ +package com.totopia.server.modules.info.type; + +public enum MessageStateName { + WAITING, + READ +} diff --git a/src/main/java/com/totopia/server/modules/info/type/NoticeStateName.java b/src/main/java/com/totopia/server/modules/info/type/NoticeStateName.java new file mode 100644 index 0000000..1806e77 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/type/NoticeStateName.java @@ -0,0 +1,6 @@ +package com.totopia.server.modules.info.type; + +public enum NoticeStateName { + NOTICE, + EVENT +} diff --git a/src/main/java/com/totopia/server/modules/info/type/QuestionStateName.java b/src/main/java/com/totopia/server/modules/info/type/QuestionStateName.java new file mode 100644 index 0000000..e83e3a3 --- /dev/null +++ b/src/main/java/com/totopia/server/modules/info/type/QuestionStateName.java @@ -0,0 +1,6 @@ +package com.totopia.server.modules.info.type; + +public enum QuestionStateName { + NORMAL, + BANK_ACCOUNT +}