contrat,booking,global logestic

This commit is contained in:
Marshal
2026-06-26 23:24:48 +00:00
parent f931342f31
commit 01d53c218c
105 changed files with 19573 additions and 909 deletions

View File

@@ -0,0 +1,36 @@
import { BaseEntity } from '@edr/api-common';
import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm';
import { Contract } from './contract.entity';
export const CONTRACT_REVIEW_NOTE_TYPES = [
'CHANGES_REQUESTED',
'REJECTION',
'STAFF_NOTE',
'CUSTOMER_NOTE',
'AMENDMENT',
] as const;
export type ContractReviewNoteType =
(typeof CONTRACT_REVIEW_NOTE_TYPES)[number];
@Entity({ schema: 'freight', name: 'contract_review_notes' })
@Index(['contractId'])
export class ContractReviewNote extends BaseEntity {
@Column({ name: 'contract_id', type: 'uuid' })
contractId!: string;
@ManyToOne(() => Contract, (c) => c.reviewNotes, { onDelete: 'CASCADE' })
@JoinColumn({ name: 'contract_id' })
contract?: Contract;
@Column({ name: 'note_type', type: 'varchar', length: 40 })
noteType!: ContractReviewNoteType;
@Column({ name: 'body', type: 'text' })
body!: string;
@Column({ name: 'author_role', type: 'varchar', length: 20, nullable: true })
authorRole?: string | null;
@Column({ name: 'author_user_id', type: 'uuid', nullable: true })
authorUserId?: string | null;
}