From 7430f1606f24ecd2046966b09ff60d334faf5de6 Mon Sep 17 00:00:00 2001 From: sohot8653 Date: Fri, 22 Aug 2025 01:10:25 +0900 Subject: [PATCH] =?UTF-8?q?[README.md=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8]=20=EB=AA=A8=EB=93=A0=20=EC=97=94=ED=8B=B0=ED=8B=B0?= =?UTF-8?q?=EA=B0=80=20`BaseEntity`=EB=A5=BC=20=EC=83=81=EC=86=8D=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B7=9C=EC=A0=95=ED=95=98=EA=B3=A0,=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=83=9D=EC=84=B1=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EB=B0=8F=20=EC=82=AC=EC=9A=A9=20=EC=98=88=EC=8B=9C=EB=A5=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=98=EC=97=AC=20=EB=AC=B8=EC=84=9C?= =?UTF-8?q?=ED=99=94=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index fec54ea..5ec4bda 100644 --- a/README.md +++ b/README.md @@ -310,3 +310,26 @@ Member entity = memberMapper.toEntity(dto); ``` **자동 생성**: 컴파일 시 `MemberMapperImpl` 구현체 생성 + +### 9. BaseEntity 상속 + +**모든 엔티티는 `BaseEntity`을 원칙으로로 합니다.** + +#### 자동 생성 필드 + +- **OID**: `@PrePersist`에서 자동 생성 (고유 식별자) +- **생성일시**: `@CreatedDate`로 자동 설정 +- **수정일시**: `@LastModifiedDate`로 자동 갱신 +- **생성자/수정자 OID**: 사용자 추적용 + +#### 사용 예시 + +```java +@Entity +@Table(name = "st_members") +public class Member extends BaseEntity { + // OID, 생성일시, 수정일시 등이 자동으로 관리됨 + private String userId; + private String name; +} +``` \ No newline at end of file