cef4e48e27
- Gradle multi-module: ga-common, ga-core, ga-api, ga-batch, ga-admin - Flyway V1-V12: org/product/rule/receive/ledger/settle/batch/code/menu/system + seed - ga-common (complete): - model: ApiResponse, PageResponse, SearchParam, TreeNode - exception: ErrorCode, BizException, GlobalExceptionHandler - annotation + aop: @RequirePermission, @DataChangeLog, ApiLog - auth + security: JWT, SecurityConfig - mybatis: BaseMapper, EncryptTypeHandler, JsonTypeHandler, AuditInterceptor - code (Redis cached) / menu (RBAC tree) / file / system / notification - excel: SXSSF+Cursor export, SAX+batch import (1M/700K rows) - util: Date/Money/Mask/Encrypt/Security
36 lines
1.2 KiB
SQL
36 lines
1.2 KiB
SQL
-- V9: 공통 코드
|
|
|
|
CREATE TABLE common_code_group (
|
|
group_code VARCHAR(20) PRIMARY KEY,
|
|
group_name VARCHAR(100) NOT NULL,
|
|
description VARCHAR(300),
|
|
is_system CHAR(1) NOT NULL DEFAULT 'N',
|
|
is_active CHAR(1) NOT NULL DEFAULT 'Y',
|
|
sort_order INT NOT NULL DEFAULT 0,
|
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
created_by BIGINT,
|
|
updated_at TIMESTAMP,
|
|
updated_by BIGINT
|
|
);
|
|
|
|
CREATE TABLE common_code (
|
|
code_id SERIAL PRIMARY KEY,
|
|
group_code VARCHAR(20) NOT NULL REFERENCES common_code_group(group_code),
|
|
code VARCHAR(30) NOT NULL,
|
|
code_name VARCHAR(100) NOT NULL,
|
|
code_name_en VARCHAR(100),
|
|
code_desc VARCHAR(300),
|
|
attr1 VARCHAR(100),
|
|
attr2 VARCHAR(100),
|
|
attr3 VARCHAR(100),
|
|
ref_code VARCHAR(50),
|
|
sort_order INT NOT NULL DEFAULT 0,
|
|
is_active CHAR(1) NOT NULL DEFAULT 'Y',
|
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
created_by BIGINT,
|
|
updated_at TIMESTAMP,
|
|
updated_by BIGINT,
|
|
UNIQUE (group_code, code)
|
|
);
|
|
CREATE INDEX idx_cc_group_active ON common_code(group_code, is_active, sort_order);
|