251120:1700 Backend T3.4

This commit is contained in:
admin
2025-11-20 17:14:15 +07:00
parent 859475b9f0
commit 20c0f51e2a
42 changed files with 1818 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
import {
Entity,
Column,
PrimaryGeneratedColumn,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';
@Entity('json_schemas')
export class JsonSchema {
@PrimaryGeneratedColumn()
id!: number;
@Column({ name: 'schema_code', unique: true, length: 100 })
schemaCode!: string; // เช่น 'RFA_DWG_V1'
@Column({ default: 1 })
version!: number;
@Column({ name: 'schema_definition', type: 'json' })
schemaDefinition!: any; // เก็บ JSON Schema มาตรฐาน (Draft 7/2019-09)
@Column({ name: 'is_active', default: true })
isActive!: boolean;
@CreateDateColumn({ name: 'created_at' })
createdAt!: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt!: Date;
}