251208:0010 Backend & Frontend Debug
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
2025-12-08 00:10:37 +07:00
parent 32d820ea6b
commit dcd126d704
99 changed files with 2775 additions and 1480 deletions

View File

@@ -20,9 +20,9 @@ import * as bcrypt from 'bcrypt';
import * as crypto from 'crypto';
import { UserService } from '../../modules/user/user.service.js';
import { User } from '../../modules/user/entities/user.entity.js';
import { User } from '../../modules/user/entities/user.entity';
import { RegisterDto } from './dto/register.dto.js';
import { RefreshToken } from './entities/refresh-token.entity.js'; // [P2-2]
import { RefreshToken } from './entities/refresh-token.entity'; // [P2-2]
@Injectable()
export class AuthService {

View File

@@ -47,9 +47,9 @@ export class AuditLog {
@Column({ name: 'user_agent', length: 255, nullable: true })
userAgent?: string;
// ✅ [Fix] รวม Decorator ไว้ที่นี่ที่เดียว
// ✅ [Fix] ทั้งสอง Decorator ต้องระบุ name: 'created_at'
@CreateDateColumn({ name: 'created_at' })
@PrimaryColumn() // เพื่อบอกว่าเป็น Composite PK คู่กับ auditId
@PrimaryColumn({ name: 'created_at' }) // Composite PK คู่กับ auditId
createdAt!: Date;
// Relations

View File

@@ -6,7 +6,7 @@ import {
ManyToOne,
JoinColumn,
} from 'typeorm';
import { User } from '../../../modules/user/entities/user.entity.js';
import { User } from '../../../modules/user/entities/user.entity';
@Entity('attachments')
export class Attachment {

View File

@@ -4,7 +4,7 @@ import { ScheduleModule } from '@nestjs/schedule'; // ✅ Import
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.js';
import { Attachment } from './entities/attachment.entity';
@Module({
imports: [

View File

@@ -12,7 +12,7 @@ import * as fs from 'fs-extra';
import * as path from 'path';
import * as crypto from 'crypto';
import { v4 as uuidv4 } from 'uuid';
import { Attachment } from './entities/attachment.entity.js';
import { Attachment } from './entities/attachment.entity';
import { ForbiddenException } from '@nestjs/common'; // ✅ Import เพิ่ม
@Injectable()