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