690417:1538 Refactor Work flow ADR-021
This commit is contained in:
@@ -49,7 +49,7 @@ export class Attachment extends UuidBaseEntity {
|
||||
|
||||
// ADR-021: FK ไปยัง workflow_histories สำหรับไฟล์แนบประจำ Step
|
||||
// NULL = ไฟล์แนบหลัก (Main Document), NOT NULL = ไฟล์ประจำ Workflow Step
|
||||
@Column({ name: 'workflow_history_id', length: 36, nullable: true })
|
||||
@Column({ name: 'workflow_history_id', nullable: true })
|
||||
workflowHistoryId?: string;
|
||||
|
||||
// Lazy relation — ไม่ include ใน default query เพื่อป้องกัน N+1
|
||||
|
||||
@@ -5,11 +5,13 @@ import { FileStorageService } from './file-storage.service.js';
|
||||
import { FileStorageController } from './file-storage.controller.js';
|
||||
import { FileCleanupService } from './file-cleanup.service.js'; // ✅ Import
|
||||
import { Attachment } from './entities/attachment.entity';
|
||||
import { UserModule } from '../../modules/user/user.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([Attachment]),
|
||||
ScheduleModule.forRoot(), // ✅ เปิดใช้งาน Cron Job],
|
||||
UserModule,
|
||||
],
|
||||
controllers: [FileStorageController],
|
||||
providers: [
|
||||
|
||||
Reference in New Issue
Block a user