251211:1314 Frontend: reeactor Admin panel
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:
admin
2025-12-11 13:14:15 +07:00
parent c8a0f281ef
commit 3fa28bd14f
79 changed files with 6571 additions and 206 deletions
@@ -0,0 +1,41 @@
import {
Entity,
Column,
PrimaryGeneratedColumn,
ManyToOne,
JoinColumn,
} from 'typeorm';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Project } from '../../project/entities/project.entity';
@Entity('contracts')
export class Contract extends BaseEntity {
@PrimaryGeneratedColumn()
id!: number;
@Column({ name: 'project_id' })
projectId!: number;
@Column({ name: 'contract_code', unique: true, length: 50 })
contractCode!: string;
@Column({ name: 'contract_name', length: 255 })
contractName!: string;
@Column({ type: 'text', nullable: true })
description?: string;
@Column({ name: 'start_date', type: 'date', nullable: true })
startDate?: Date;
@Column({ name: 'end_date', type: 'date', nullable: true })
endDate?: Date;
@Column({ name: 'is_active', default: true })
isActive!: boolean;
// Relation
@ManyToOne(() => Project)
@JoinColumn({ name: 'project_id' })
project?: Project;
}