배치관리 중간커밋
This commit is contained in:
@@ -65,6 +65,58 @@ model external_db_connections {
|
||||
@@index([connection_name], map: "idx_external_db_connections_name")
|
||||
}
|
||||
|
||||
// 배치관리 테이블들
|
||||
model batch_configs {
|
||||
id Int @id @default(autoincrement())
|
||||
batch_name String @db.VarChar(100)
|
||||
description String?
|
||||
cron_schedule String @db.VarChar(50) // 크론탭 형식
|
||||
is_active String? @default("Y") @db.Char(1)
|
||||
company_code String? @default("*") @db.VarChar(20)
|
||||
created_date DateTime? @default(now()) @db.Timestamp(6)
|
||||
created_by String? @db.VarChar(50)
|
||||
updated_date DateTime? @default(now()) @updatedAt @db.Timestamp(6)
|
||||
updated_by String? @db.VarChar(50)
|
||||
|
||||
// 관계 설정
|
||||
batch_mappings batch_mappings[]
|
||||
|
||||
@@index([batch_name], map: "idx_batch_configs_name")
|
||||
@@index([is_active], map: "idx_batch_configs_active")
|
||||
}
|
||||
|
||||
model batch_mappings {
|
||||
id Int @id @default(autoincrement())
|
||||
batch_config_id Int
|
||||
|
||||
// FROM 정보
|
||||
from_connection_type String @db.VarChar(20) // 'internal' 또는 'external'
|
||||
from_connection_id Int? // external_db_connections.id (외부 DB인 경우)
|
||||
from_table_name String @db.VarChar(100)
|
||||
from_column_name String @db.VarChar(100)
|
||||
from_column_type String? @db.VarChar(50)
|
||||
|
||||
// TO 정보
|
||||
to_connection_type String @db.VarChar(20) // 'internal' 또는 'external'
|
||||
to_connection_id Int? // external_db_connections.id (외부 DB인 경우)
|
||||
to_table_name String @db.VarChar(100)
|
||||
to_column_name String @db.VarChar(100)
|
||||
to_column_type String? @db.VarChar(50)
|
||||
|
||||
// 매핑 순서 (같은 FROM 컬럼에서 여러 TO로 매핑될 때 순서)
|
||||
mapping_order Int? @default(1)
|
||||
|
||||
created_date DateTime? @default(now()) @db.Timestamp(6)
|
||||
created_by String? @db.VarChar(50)
|
||||
|
||||
// 관계 설정
|
||||
batch_config batch_configs @relation(fields: [batch_config_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([batch_config_id], map: "idx_batch_mappings_config")
|
||||
@@index([from_connection_type, from_connection_id], map: "idx_batch_mappings_from")
|
||||
@@index([to_connection_type, to_connection_id], map: "idx_batch_mappings_to")
|
||||
}
|
||||
|
||||
model admin_supply_mng {
|
||||
objid Decimal @id @default(0) @db.Decimal
|
||||
supply_code String? @default("NULL::character varying") @db.VarChar(100)
|
||||
|
||||
Reference in New Issue
Block a user