diff --git a/src/entity/finance/finance_cpvs.ts b/src/entity/finance/finance_cpvs.ts index 1b9252d..707a612 100644 --- a/src/entity/finance/finance_cpvs.ts +++ b/src/entity/finance/finance_cpvs.ts @@ -7,6 +7,7 @@ import { FinanceCpvPaymentMethodType, FinanceCpvPaymentModelType, FinanceCpvPaym import { FinanceAgencia } from "./finance_agencia"; import { FinanceFundingSource } from "./finance_funding_sources"; import { FinanceCompany } from "./finance_company"; +import { FinancePurchaseRequest } from "./finance_purchase_requests"; @Entity("finance_cpvs", { schema: "finances" }) export class FinanceCpv { @@ -33,6 +34,10 @@ export class FinanceCpv { @JoinColumn() localizacao: FinanceLocalizacao; + @ManyToOne(() => FinancePurchaseRequest, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + purchase_request: FinancePurchaseRequest; + @Column({ nullable: false, length: 128, @@ -84,6 +89,40 @@ export class FinanceCpv { }) description_item: String; + @Column({ + type: "text", + nullable: true, + }) + explanation_justification: String; + + @Column({ + type: "text", + nullable: true, + }) + payment_description: String; + + @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + financial_responsible: HrmsEmployee; + + @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + agency_authorizer: HrmsEmployee; + + @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + agency_certifier: HrmsEmployee; + + @ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true }) + @JoinColumn() + treasury_authorizer: HrmsEmployee; + + @Column({ + type: "jsonb", + nullable: true, + }) + documents: any; + @Column({ nullable: false, length: 128, diff --git a/src/schema/finances.ts b/src/schema/finances.ts index 75b6e41..b60f739 100644 --- a/src/schema/finances.ts +++ b/src/schema/finances.ts @@ -11,5 +11,6 @@ export * from "../entity/finance/finance_plans"; export * from "../entity/finance/finance_plan_items"; export * from "../entity/finance/finance_purchase_requests"; export * from "../entity/finance/finance_purchase_request_items"; +export * from "../entity/finance/finance_cpvs"; export * from "../types/finance";