[DB 스키마 및 엔티티 주석 추가] st_common_code, st_common_group_code, st_file, st_member 테이블에 대한 주석 추가 및 관련 엔티티 클래스에 @Comment 어노테이션 적용
This commit is contained in:
195
ddl/schema.sql
195
ddl/schema.sql
@@ -22,6 +22,63 @@
|
|||||||
primary key (oid)
|
primary key (oid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
comment on column st_common_code.sort_order is
|
||||||
|
'정렬 순번';
|
||||||
|
|
||||||
|
comment on column st_common_code.use_flag is
|
||||||
|
'사용 여부';
|
||||||
|
|
||||||
|
comment on column st_common_code.created_at is
|
||||||
|
'생성일시';
|
||||||
|
|
||||||
|
comment on column st_common_code.created_oid is
|
||||||
|
'생성자 OID';
|
||||||
|
|
||||||
|
comment on column st_common_code.oid is
|
||||||
|
'OID';
|
||||||
|
|
||||||
|
comment on column st_common_code.updated_at is
|
||||||
|
'수정일시';
|
||||||
|
|
||||||
|
comment on column st_common_code.updated_oid is
|
||||||
|
'수정자 OID';
|
||||||
|
|
||||||
|
comment on column st_common_code.code is
|
||||||
|
'코드';
|
||||||
|
|
||||||
|
comment on column st_common_code.group_code is
|
||||||
|
'그룹 코드';
|
||||||
|
|
||||||
|
comment on column st_common_code.parent_code is
|
||||||
|
'부모 코드';
|
||||||
|
|
||||||
|
comment on column st_common_code.character_ref1 is
|
||||||
|
'문자 참조1';
|
||||||
|
|
||||||
|
comment on column st_common_code.character_ref2 is
|
||||||
|
'문자 참조2';
|
||||||
|
|
||||||
|
comment on column st_common_code.character_ref3 is
|
||||||
|
'문자 참조3';
|
||||||
|
|
||||||
|
comment on column st_common_code.character_ref4 is
|
||||||
|
'문자 참조4';
|
||||||
|
|
||||||
|
comment on column st_common_code.character_ref5 is
|
||||||
|
'문자 참조5';
|
||||||
|
|
||||||
|
comment on column st_common_code.name is
|
||||||
|
'코드명';
|
||||||
|
|
||||||
|
comment on column st_common_code.description is
|
||||||
|
'설명';
|
||||||
|
|
||||||
|
comment on column st_common_code.created_id is
|
||||||
|
'생성자 ID';
|
||||||
|
|
||||||
|
comment on column st_common_code.updated_id is
|
||||||
|
'수정자 ID';
|
||||||
|
|
||||||
create table st_common_group_code (
|
create table st_common_group_code (
|
||||||
sort_order integer not null,
|
sort_order integer not null,
|
||||||
use_flag boolean not null,
|
use_flag boolean not null,
|
||||||
@@ -42,6 +99,54 @@
|
|||||||
primary key (oid)
|
primary key (oid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
comment on column st_common_group_code.sort_order is
|
||||||
|
'정렬 순번';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.use_flag is
|
||||||
|
'사용 여부';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.created_at is
|
||||||
|
'생성일시';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.created_oid is
|
||||||
|
'생성자 OID';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.oid is
|
||||||
|
'OID';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.updated_at is
|
||||||
|
'수정일시';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.updated_oid is
|
||||||
|
'수정자 OID';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.code is
|
||||||
|
'코드';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.character_ref1_title is
|
||||||
|
'문자 참조 타이틀1';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.character_ref2_title is
|
||||||
|
'문자 참조 타이틀2';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.character_ref3_title is
|
||||||
|
'문자 참조 타이틀3';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.character_ref4_title is
|
||||||
|
'문자 참조 타이틀4';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.character_ref5_title is
|
||||||
|
'문자 참조 타이틀5';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.name is
|
||||||
|
'코드명';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.created_id is
|
||||||
|
'생성자 ID';
|
||||||
|
|
||||||
|
comment on column st_common_group_code.updated_id is
|
||||||
|
'수정자 ID';
|
||||||
|
|
||||||
create table st_file (
|
create table st_file (
|
||||||
use_flag boolean not null,
|
use_flag boolean not null,
|
||||||
created_at timestamp(6) not null,
|
created_at timestamp(6) not null,
|
||||||
@@ -61,6 +166,51 @@
|
|||||||
primary key (oid)
|
primary key (oid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
comment on column st_file.use_flag is
|
||||||
|
'사용 여부';
|
||||||
|
|
||||||
|
comment on column st_file.created_at is
|
||||||
|
'생성일시';
|
||||||
|
|
||||||
|
comment on column st_file.created_oid is
|
||||||
|
'생성자 OID';
|
||||||
|
|
||||||
|
comment on column st_file.file_size is
|
||||||
|
'파일 크기';
|
||||||
|
|
||||||
|
comment on column st_file.group_oid is
|
||||||
|
'그룹 OID';
|
||||||
|
|
||||||
|
comment on column st_file.oid is
|
||||||
|
'OID';
|
||||||
|
|
||||||
|
comment on column st_file.updated_at is
|
||||||
|
'수정일시';
|
||||||
|
|
||||||
|
comment on column st_file.updated_oid is
|
||||||
|
'수정자 OID';
|
||||||
|
|
||||||
|
comment on column st_file.content_type is
|
||||||
|
'콘텐츠 타입';
|
||||||
|
|
||||||
|
comment on column st_file.created_id is
|
||||||
|
'생성자 ID';
|
||||||
|
|
||||||
|
comment on column st_file.description is
|
||||||
|
'설명';
|
||||||
|
|
||||||
|
comment on column st_file.file_path is
|
||||||
|
'파일 경로';
|
||||||
|
|
||||||
|
comment on column st_file.original_file_name is
|
||||||
|
'원본 파일명';
|
||||||
|
|
||||||
|
comment on column st_file.stored_file_name is
|
||||||
|
'저장 파일명';
|
||||||
|
|
||||||
|
comment on column st_file.updated_id is
|
||||||
|
'수정자 ID';
|
||||||
|
|
||||||
create table st_member (
|
create table st_member (
|
||||||
use_flag boolean not null,
|
use_flag boolean not null,
|
||||||
created_at timestamp(6) not null,
|
created_at timestamp(6) not null,
|
||||||
@@ -80,6 +230,51 @@
|
|||||||
primary key (oid)
|
primary key (oid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
comment on column st_member.use_flag is
|
||||||
|
'사용 여부';
|
||||||
|
|
||||||
|
comment on column st_member.created_at is
|
||||||
|
'생성일시';
|
||||||
|
|
||||||
|
comment on column st_member.created_oid is
|
||||||
|
'생성자 OID';
|
||||||
|
|
||||||
|
comment on column st_member.last_login_at is
|
||||||
|
'마지막 로그인 일시';
|
||||||
|
|
||||||
|
comment on column st_member.oid is
|
||||||
|
'OID';
|
||||||
|
|
||||||
|
comment on column st_member.updated_at is
|
||||||
|
'수정일시';
|
||||||
|
|
||||||
|
comment on column st_member.updated_oid is
|
||||||
|
'수정자 OID';
|
||||||
|
|
||||||
|
comment on column st_member.login_ip is
|
||||||
|
'로그인 IP';
|
||||||
|
|
||||||
|
comment on column st_member.name is
|
||||||
|
'이름';
|
||||||
|
|
||||||
|
comment on column st_member.password is
|
||||||
|
'비밀번호';
|
||||||
|
|
||||||
|
comment on column st_member.user_id is
|
||||||
|
'사용자 ID';
|
||||||
|
|
||||||
|
comment on column st_member.refresh_token is
|
||||||
|
'리프레시 토큰';
|
||||||
|
|
||||||
|
comment on column st_member.created_id is
|
||||||
|
'생성자 ID';
|
||||||
|
|
||||||
|
comment on column st_member.email is
|
||||||
|
'이메일';
|
||||||
|
|
||||||
|
comment on column st_member.updated_id is
|
||||||
|
'수정자 ID';
|
||||||
|
|
||||||
create index idx_common_code_code
|
create index idx_common_code_code
|
||||||
on st_common_code (code);
|
on st_common_code (code);
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@ import lombok.Builder;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Comment;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Getter @Setter
|
@Getter @Setter
|
||||||
@@ -25,40 +26,52 @@ import lombok.Setter;
|
|||||||
public class CommonCode extends BaseEntity {
|
public class CommonCode extends BaseEntity {
|
||||||
|
|
||||||
@Column(name = "code", nullable = false, length = 50, unique = true)
|
@Column(name = "code", nullable = false, length = 50, unique = true)
|
||||||
|
@Comment("코드")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@Column(name = "name", nullable = false, length = 100)
|
@Column(name = "name", nullable = false, length = 100)
|
||||||
|
@Comment("코드명")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(name = "description", length = 500)
|
@Column(name = "description", length = 500)
|
||||||
|
@Comment("설명")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Column(name = "group_code", nullable = false, length = 50)
|
@Column(name = "group_code", nullable = false, length = 50)
|
||||||
|
@Comment("그룹 코드")
|
||||||
private String groupCode;
|
private String groupCode;
|
||||||
|
|
||||||
@Column(name = "parent_code", length = 50)
|
@Column(name = "parent_code", length = 50)
|
||||||
|
@Comment("부모 코드")
|
||||||
private String parentCode;
|
private String parentCode;
|
||||||
|
|
||||||
@Column(name = "character_ref1", length = 100)
|
@Column(name = "character_ref1", length = 100)
|
||||||
|
@Comment("문자 참조1")
|
||||||
private String characterRef1;
|
private String characterRef1;
|
||||||
|
|
||||||
@Column(name = "character_ref2", length = 100)
|
@Column(name = "character_ref2", length = 100)
|
||||||
|
@Comment("문자 참조2")
|
||||||
private String characterRef2;
|
private String characterRef2;
|
||||||
|
|
||||||
@Column(name = "character_ref3", length = 100)
|
@Column(name = "character_ref3", length = 100)
|
||||||
|
@Comment("문자 참조3")
|
||||||
private String characterRef3;
|
private String characterRef3;
|
||||||
|
|
||||||
@Column(name = "character_ref4", length = 100)
|
@Column(name = "character_ref4", length = 100)
|
||||||
|
@Comment("문자 참조4")
|
||||||
private String characterRef4;
|
private String characterRef4;
|
||||||
|
|
||||||
@Column(name = "character_ref5", length = 100)
|
@Column(name = "character_ref5", length = 100)
|
||||||
|
@Comment("문자 참조5")
|
||||||
private String characterRef5;
|
private String characterRef5;
|
||||||
|
|
||||||
@Column(name = "sort_order", nullable = false)
|
@Column(name = "sort_order", nullable = false)
|
||||||
|
@Comment("정렬 순번")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Integer sortOrder = 0;
|
private Integer sortOrder = 0;
|
||||||
|
|
||||||
@Column(name = "use_flag", nullable = false)
|
@Column(name = "use_flag", nullable = false)
|
||||||
|
@Comment("사용 여부")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Boolean useFlag = true;
|
private Boolean useFlag = true;
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@ import lombok.Builder;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Comment;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Getter @Setter
|
@Getter @Setter
|
||||||
@@ -23,31 +24,40 @@ import lombok.Setter;
|
|||||||
public class CommonGroupCode extends BaseEntity {
|
public class CommonGroupCode extends BaseEntity {
|
||||||
|
|
||||||
@Column(name = "code", nullable = false, length = 50, unique = true)
|
@Column(name = "code", nullable = false, length = 50, unique = true)
|
||||||
|
@Comment("코드")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@Column(name = "name", nullable = false, length = 100)
|
@Column(name = "name", nullable = false, length = 100)
|
||||||
|
@Comment("코드명")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(name = "character_ref1_title", length = 100)
|
@Column(name = "character_ref1_title", length = 100)
|
||||||
|
@Comment("문자 참조 타이틀1")
|
||||||
private String characterRef1Title;
|
private String characterRef1Title;
|
||||||
|
|
||||||
@Column(name = "character_ref2_title", length = 100)
|
@Column(name = "character_ref2_title", length = 100)
|
||||||
|
@Comment("문자 참조 타이틀2")
|
||||||
private String characterRef2Title;
|
private String characterRef2Title;
|
||||||
|
|
||||||
@Column(name = "character_ref3_title", length = 100)
|
@Column(name = "character_ref3_title", length = 100)
|
||||||
|
@Comment("문자 참조 타이틀3")
|
||||||
private String characterRef3Title;
|
private String characterRef3Title;
|
||||||
|
|
||||||
@Column(name = "character_ref4_title", length = 100)
|
@Column(name = "character_ref4_title", length = 100)
|
||||||
|
@Comment("문자 참조 타이틀4")
|
||||||
private String characterRef4Title;
|
private String characterRef4Title;
|
||||||
|
|
||||||
@Column(name = "character_ref5_title", length = 100)
|
@Column(name = "character_ref5_title", length = 100)
|
||||||
|
@Comment("문자 참조 타이틀5")
|
||||||
private String characterRef5Title;
|
private String characterRef5Title;
|
||||||
|
|
||||||
@Column(name = "sort_order", nullable = false)
|
@Column(name = "sort_order", nullable = false)
|
||||||
|
@Comment("정렬 순번")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Integer sortOrder = 0;
|
private Integer sortOrder = 0;
|
||||||
|
|
||||||
@Column(name = "use_flag", nullable = false)
|
@Column(name = "use_flag", nullable = false)
|
||||||
|
@Comment("사용 여부")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Boolean useFlag = true;
|
private Boolean useFlag = true;
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ import com.bio.bio_backend.global.constants.AppConstants;
|
|||||||
import com.bio.bio_backend.global.entity.BaseEntity;
|
import com.bio.bio_backend.global.entity.BaseEntity;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import org.hibernate.annotations.Comment;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = AppConstants.TABLE_PREFIX + "file")
|
@Table(name = AppConstants.TABLE_PREFIX + "file")
|
||||||
@@ -15,27 +16,35 @@ import lombok.*;
|
|||||||
public class File extends BaseEntity {
|
public class File extends BaseEntity {
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("원본 파일명")
|
||||||
private String originalFileName;
|
private String originalFileName;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("저장 파일명")
|
||||||
private String storedFileName;
|
private String storedFileName;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("파일 경로")
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("파일 크기")
|
||||||
private Long fileSize;
|
private Long fileSize;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("콘텐츠 타입")
|
||||||
private String contentType;
|
private String contentType;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
@Comment("설명")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
@Comment("그룹 OID")
|
||||||
private Long groupOid;
|
private Long groupOid;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
@Comment("사용 여부")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Boolean useFlag = true;
|
private Boolean useFlag = true;
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,8 @@ import lombok.Setter;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.Comment;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Getter @Setter
|
@Getter @Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -25,30 +27,36 @@ import java.time.LocalDateTime;
|
|||||||
public class Member extends BaseEntity {
|
public class Member extends BaseEntity {
|
||||||
|
|
||||||
@Column(name = "user_id", nullable = false, length = 100)
|
@Column(name = "user_id", nullable = false, length = 100)
|
||||||
|
@Comment("사용자 ID")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
@Column(name = "password", nullable = false, length = 100)
|
@Column(name = "password", nullable = false, length = 100)
|
||||||
|
@Comment("비밀번호")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Column(name = "name", nullable = false, length = 100)
|
@Column(name = "name", nullable = false, length = 100)
|
||||||
|
@Comment("이름")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Column(name = "email", nullable = false, length = 255)
|
@Column(name = "email", nullable = false, length = 255)
|
||||||
|
@Comment("이메일")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "use_flag", nullable = false)
|
@Column(name = "use_flag", nullable = false)
|
||||||
|
@Comment("사용 여부")
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Boolean useFlag = true;
|
private Boolean useFlag = true;
|
||||||
|
|
||||||
@Column(name = "refresh_token", length = 1024)
|
@Column(name = "refresh_token", length = 1024)
|
||||||
|
@Comment("리프레시 토큰")
|
||||||
private String refreshToken;
|
private String refreshToken;
|
||||||
|
|
||||||
@Column(name = "login_ip", length = 45) // IPv6 지원을 위해 45자
|
@Column(name = "login_ip", length = 45) // IPv6 지원을 위해 45자
|
||||||
|
@Comment("로그인 IP")
|
||||||
private String loginIp;
|
private String loginIp;
|
||||||
|
|
||||||
@Column(name = "last_login_at")
|
@Column(name = "last_login_at")
|
||||||
|
@Comment("마지막 로그인 일시")
|
||||||
private LocalDateTime lastLoginAt;
|
private LocalDateTime lastLoginAt;
|
||||||
|
|
||||||
}
|
}
|
@@ -3,6 +3,8 @@ package com.bio.bio_backend.global.entity;
|
|||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.Comment;
|
||||||
import org.springframework.data.annotation.CreatedDate;
|
import org.springframework.data.annotation.CreatedDate;
|
||||||
import org.springframework.data.annotation.LastModifiedDate;
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||||
@@ -23,26 +25,33 @@ public abstract class BaseEntity {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "oid", nullable = false)
|
@Column(name = "oid", nullable = false)
|
||||||
|
@Comment("OID")
|
||||||
private Long oid;
|
private Long oid;
|
||||||
|
|
||||||
@CreatedDate
|
@CreatedDate
|
||||||
@Column(name = "created_at", nullable = false, updatable = false)
|
@Column(name = "created_at", nullable = false, updatable = false)
|
||||||
|
@Comment("생성일시")
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
@LastModifiedDate
|
@LastModifiedDate
|
||||||
@Column(name = "updated_at", nullable = false)
|
@Column(name = "updated_at", nullable = false)
|
||||||
|
@Comment("수정일시")
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
@Column(name = "created_oid", updatable = false)
|
@Column(name = "created_oid", updatable = false)
|
||||||
|
@Comment("생성자 OID")
|
||||||
private Long createdOid;
|
private Long createdOid;
|
||||||
|
|
||||||
@Column(name = "updated_oid")
|
@Column(name = "updated_oid")
|
||||||
|
@Comment("수정자 OID")
|
||||||
private Long updatedOid;
|
private Long updatedOid;
|
||||||
|
|
||||||
@Column(name = "created_id", updatable = false)
|
@Column(name = "created_id", updatable = false)
|
||||||
|
@Comment("생성자 ID")
|
||||||
private String createdId;
|
private String createdId;
|
||||||
|
|
||||||
@Column(name = "updated_id")
|
@Column(name = "updated_id")
|
||||||
|
@Comment("수정자 ID")
|
||||||
private String updatedId;
|
private String updatedId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user