690325:2132 Fixing Naming convention missunderstand #01
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"npm.packageManager": "pnpm"
|
||||
}
|
||||
@@ -88,7 +88,7 @@ export class FormatService {
|
||||
|
||||
// 3. Fallback
|
||||
return {
|
||||
template: '{ORG}-{RECIPIENT}-{SEQ:4}-{YEAR:BE}',
|
||||
template: '{ORG}-{RECIPIENT}-{SEQ:4}/{YEAR:BE}',
|
||||
resetSequenceYearly: true,
|
||||
isDefault: true,
|
||||
};
|
||||
|
||||
@@ -14,23 +14,23 @@ import { Type } from 'class-transformer';
|
||||
export class VirtualColumnConfigDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
json_path!: string;
|
||||
jsonPath!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
column_name!: string;
|
||||
columnName!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
data_type!: 'INT' | 'VARCHAR' | 'BOOLEAN' | 'DATE' | 'DECIMAL' | 'DATETIME';
|
||||
dataType!: 'INT' | 'VARCHAR' | 'BOOLEAN' | 'DATE' | 'DECIMAL' | 'DATETIME';
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
index_type?: 'INDEX' | 'UNIQUE' | 'FULLTEXT';
|
||||
indexType?: 'INDEX' | 'UNIQUE' | 'FULLTEXT';
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
is_required?: boolean;
|
||||
isRequired?: boolean;
|
||||
}
|
||||
|
||||
export class CreateJsonSchemaDto {
|
||||
|
||||
@@ -9,11 +9,11 @@ import {
|
||||
} from 'typeorm';
|
||||
|
||||
export interface VirtualColumnConfig {
|
||||
json_path: string;
|
||||
column_name: string;
|
||||
data_type: 'INT' | 'VARCHAR' | 'BOOLEAN' | 'DATE' | 'DECIMAL' | 'DATETIME';
|
||||
index_type?: 'INDEX' | 'UNIQUE' | 'FULLTEXT';
|
||||
is_required: boolean;
|
||||
jsonPath: string;
|
||||
columnName: string;
|
||||
dataType: 'INT' | 'VARCHAR' | 'BOOLEAN' | 'DATE' | 'DECIMAL' | 'DATETIME';
|
||||
indexType?: 'INDEX' | 'UNIQUE' | 'FULLTEXT';
|
||||
isRequired: boolean;
|
||||
}
|
||||
|
||||
@Entity('json_schemas')
|
||||
|
||||
@@ -12,19 +12,19 @@ import {
|
||||
import { Project } from '../../project/entities/project.entity';
|
||||
|
||||
@Entity('tags')
|
||||
@Unique('ux_tag_project', ['project_id', 'tag_name'])
|
||||
@Unique('ux_tag_project', ['projectId', 'tagName'])
|
||||
export class Tag {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number; // เพิ่ม !
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
project_id!: number | null; // เพิ่ม !
|
||||
projectId!: number | null; // เพิ่ม !
|
||||
|
||||
@Column({ length: 100 })
|
||||
tag_name!: string; // เพิ่ม !
|
||||
tagName!: string; // เพิ่ม !
|
||||
|
||||
@Column({ length: 30, default: 'default' })
|
||||
color_code!: string; // เพิ่ม !
|
||||
colorCode!: string; // เพิ่ม !
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
description!: string | null; // เพิ่ม !
|
||||
@@ -35,14 +35,14 @@ export class Tag {
|
||||
project?: Project;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at!: Date; // เพิ่ม !
|
||||
createdAt!: Date; // เพิ่ม !
|
||||
|
||||
@UpdateDateColumn()
|
||||
updated_at!: Date; // เพิ่ม !
|
||||
updatedAt!: Date; // เพิ่ม !
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
created_by!: number | null; // เพิ่ม !
|
||||
createdBy!: number | null; // เพิ่ม !
|
||||
|
||||
@DeleteDateColumn()
|
||||
deleted_at!: Date | null; // เพิ่ม !
|
||||
deletedAt!: Date | null; // เพิ่ม !
|
||||
}
|
||||
|
||||
@@ -4,22 +4,22 @@ import { MigrationErrorType } from '../entities/migration-error.entity';
|
||||
export class CreateMigrationErrorDto {
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
batch_id?: string;
|
||||
batchId?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
document_number?: string;
|
||||
documentNumber?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@IsEnum(MigrationErrorType)
|
||||
error_type?: MigrationErrorType;
|
||||
errorType?: MigrationErrorType;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
error_message?: string;
|
||||
errorMessage?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
raw_ai_response?: string;
|
||||
rawAiResponse?: string;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
export class EnqueueMigrationDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
document_number!: string;
|
||||
documentNumber!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@@ -18,7 +18,7 @@ export class EnqueueMigrationDto {
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
original_subject?: string;
|
||||
originalSubject?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@@ -30,27 +30,27 @@ export class EnqueueMigrationDto {
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
ai_summary?: string;
|
||||
aiSummary?: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
project_id?: number;
|
||||
projectId?: number;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
sender_org_id?: number;
|
||||
senderOrgId?: number;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
receiver_org_id?: number;
|
||||
receiverOrgId?: number;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
issued_date?: string;
|
||||
issuedDate?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
received_date?: string;
|
||||
receivedDate?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@@ -58,18 +58,18 @@ export class EnqueueMigrationDto {
|
||||
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
extracted_tags?: Record<string, string>[];
|
||||
extractedTags?: Record<string, string>[];
|
||||
|
||||
@IsOptional()
|
||||
details?: Record<string, unknown>;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
temp_attachment_id?: number;
|
||||
tempAttachmentId?: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
is_valid?: boolean;
|
||||
isValid?: boolean;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@@ -77,5 +77,5 @@ export class EnqueueMigrationDto {
|
||||
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
ai_issues?: Record<string, unknown>[];
|
||||
aiIssues?: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
export class ImportCorrespondenceDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
document_number!: string;
|
||||
documentNumber!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@@ -21,26 +21,26 @@ export class ImportCorrespondenceDto {
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
source_file_path?: string;
|
||||
sourceFilePath?: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
temp_attachment_id?: number;
|
||||
tempAttachmentId?: number;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
ai_confidence?: number;
|
||||
aiConfidence?: number;
|
||||
|
||||
@IsOptional()
|
||||
ai_issues?: Record<string, unknown>[];
|
||||
aiIssues?: Record<string, unknown>[];
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
migrated_by!: string; // "SYSTEM_IMPORT"
|
||||
migratedBy!: string; // "SYSTEM_IMPORT"
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
batch_id!: string;
|
||||
batchId!: string;
|
||||
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
@@ -48,31 +48,31 @@ export class ImportCorrespondenceDto {
|
||||
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
project_id!: number;
|
||||
projectId!: number;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
issued_date?: string;
|
||||
issuedDate?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
received_date?: string;
|
||||
receivedDate?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
document_date?: string;
|
||||
documentDate?: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
discipline_id?: number;
|
||||
disciplineId?: number;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
sender_id?: number;
|
||||
senderId?: number;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
receiver_id?: number;
|
||||
receiverId?: number;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user