260318:1135 Fix UUID #3
Build and Deploy / deploy (push) Successful in 8m43s

This commit is contained in:
admin
2026-03-18 11:35:51 +07:00
parent 6172b058df
commit 5d89079c2a
43 changed files with 1073 additions and 132 deletions
@@ -6,7 +6,10 @@ import {
UpdateDateColumn,
DeleteDateColumn,
Unique,
ManyToOne,
JoinColumn,
} from 'typeorm';
import { Project } from '../../project/entities/project.entity';
@Entity('tags')
@Unique('ux_tag_project', ['project_id', 'tag_name'])
@@ -26,6 +29,11 @@ export class Tag {
@Column({ type: 'text', nullable: true })
description!: string | null; // เพิ่ม !
// Relations
@ManyToOne(() => Project)
@JoinColumn({ name: 'project_id' })
project?: Project;
@CreateDateColumn()
created_at!: Date; // เพิ่ม !
+4 -1
View File
@@ -132,6 +132,7 @@ export class MasterService {
}
return this.rfaTypeRepo.find({
where,
relations: ['contract'],
order: { typeCode: 'ASC' },
});
}
@@ -296,7 +297,9 @@ export class MasterService {
}
async findAllTags(query?: SearchTagDto) {
const qb = this.tagRepo.createQueryBuilder('tag');
const qb = this.tagRepo
.createQueryBuilder('tag')
.leftJoinAndSelect('tag.project', 'project');
if (query?.project_id) {
// In Tags, we use project_id (INT) directly or resolve if UUID passed via query