add table procurement_project_yearly
This commit is contained in:
131
src/entity/procurement/procurement_project_yearly.ts
Normal file
131
src/entity/procurement/procurement_project_yearly.ts
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
||||||
|
import { ProcurementMethod, ProcurementPreparationStatus, ProcurementStatusType } from "../../types/procurement";
|
||||||
|
|
||||||
|
@Entity("procurement_project_yearly", { schema: "procurement" })
|
||||||
|
export class ProcurementProjectYearly {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// BASIC INFO
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
@Column({ type: "int" })
|
||||||
|
fiscal_year: number; // Tahun anggaran (2025)
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 256 })
|
||||||
|
program_name: string; // Program & atividade PA
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
activity_description: string; // Sasan / Obrasa / Servisu description
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 50, nullable: true })
|
||||||
|
anatl_code: string; // Kodigu ANATL,E.P.
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
sequence_number: number; // N. Sekuensia
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
quantity: number; // Kuantidade
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 50, nullable: true })
|
||||||
|
budget_category: string; // Categoria Orsamentu (ABC, DC, etc)
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 50, nullable: true })
|
||||||
|
item_code: string; // Item Code (livro oramentu)
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 50, nullable: true })
|
||||||
|
line_item_code: string; // Line Item Code
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
organization_name: string; // ANATL, E.P.
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
estimated_cost_usd: number; // Kusto Estimasaun (USD)
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// SPECIFICATION & PROCESS
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
specification: string; // Detail Specification / TOR / SOW
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
preparation_status: ProcurementPreparationStatus; // Status preparation (ready / not ready)
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: true })
|
||||||
|
finance_submission_date: Date; // Data entrega ba Finansas
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
implementation_location: string; // Local implementasaun
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: true })
|
||||||
|
implementation_date: Date; // Data implementasaun
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 50, nullable: true })
|
||||||
|
procurement_method: ProcurementMethod; // DP, SP, RFP, RFQ, NCB, ICB
|
||||||
|
|
||||||
|
@Column({ type: "boolean", default: false })
|
||||||
|
contract_exists: boolean; // Kontratu existe no valido
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
fund_source: string; // Foun
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// KRONOGRAMA DE APROVISIONAMENTU
|
||||||
|
// (Quarterly Budget Plan)
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
budget_q1_usd: number; // 1T Planu de Despeza
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
budget_q2_usd: number; // 2T
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
budget_q3_usd: number; // 3T
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
budget_q4_usd: number; // 4T
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// ESTIMATED EXECUTION
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
estimated_q1_value: number; // Estimasaun 1T
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
estimated_q2_value: number; // 2T
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
estimated_q3_value: number; // 3T
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
estimated_q4_value: number; // 4T
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// STATUS & AUDIT
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 30, default: "DRAFT" })
|
||||||
|
status: ProcurementStatusType;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -1,2 +1,3 @@
|
|||||||
export * from "../entity/procurement/procurement_category";
|
export * from "../entity/procurement/procurement_category";
|
||||||
export * from "../entity/procurement/procurement_vendor";
|
export * from "../entity/procurement/procurement_vendor";
|
||||||
|
export * from "../entity/procurement/procurement_project_yearly";
|
||||||
|
|||||||
22
src/types/procurement.ts
Normal file
22
src/types/procurement.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
export enum ProcurementStatusType {
|
||||||
|
draft = "draft",
|
||||||
|
pending_review = "pending_review",
|
||||||
|
pending_approve = "pending_approve",
|
||||||
|
approve = "approve",
|
||||||
|
reject = "reject",
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ProcurementPreparationStatus {
|
||||||
|
ready = "ready",
|
||||||
|
not_ready = "not_ready",
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ProcurementMethod {
|
||||||
|
DP = "DP",
|
||||||
|
SP = "SP",
|
||||||
|
RFP = "RFP",
|
||||||
|
SINGLE_SOURCE = "SINGLE_SOURCE",
|
||||||
|
RFQ = "RFQ",
|
||||||
|
NCB = "NCB",
|
||||||
|
ICB = "ICB",
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user