정보 패키지 모델 생

This commit is contained in:
byung eun park 2019-10-17 19:12:51 +09:00
parent 706df2a934
commit 20d56b9032
11 changed files with 261 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -0,0 +1,9 @@
package com.totopia.server.modules.info.type;
public enum AnswerStateName {
UNANSWERED,
ANSWER_DONE,
CHECKING_USER,
CONFIRMED_USER,
}

View File

@ -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,

View File

@ -0,0 +1,6 @@
package com.totopia.server.modules.info.type;
public enum MessageStateName {
WAITING,
READ
}

View File

@ -0,0 +1,6 @@
package com.totopia.server.modules.info.type;
public enum NoticeStateName {
NOTICE,
EVENT
}

View File

@ -0,0 +1,6 @@
package com.totopia.server.modules.info.type;
public enum QuestionStateName {
NORMAL,
BANK_ACCOUNT
}