fixing earchive doc
This commit is contained in:
@ -2,6 +2,7 @@ import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToO
|
||||
import { User } from "./users";
|
||||
import { StatusDocument, TypeDocument, TypePriority } from "../types/earchive";
|
||||
import { EarchiveDocLogs } from "./earchive_doclogs";
|
||||
import { EarchiveReceiver } from "./earchive_receiver";
|
||||
|
||||
@Entity("earchive_doc", { schema: "earchive" })
|
||||
export class EarchiveDoc {
|
||||
@ -10,16 +11,16 @@ export class EarchiveDoc {
|
||||
|
||||
@Column({ nullable: true })
|
||||
docnumber: string;
|
||||
|
||||
|
||||
@Column({ nullable: true })
|
||||
docsubject: string;
|
||||
|
||||
|
||||
@Column({ nullable: true })
|
||||
doctype: TypeDocument;
|
||||
|
||||
@Column({ nullable: true })
|
||||
doctypename: string;
|
||||
|
||||
|
||||
@Column({ nullable: true })
|
||||
docpriority: TypePriority;
|
||||
|
||||
@ -28,39 +29,39 @@ export class EarchiveDoc {
|
||||
|
||||
@Column({ name: 'docdates', nullable: true })
|
||||
docdates: Date;
|
||||
|
||||
@Column({ name: 'approvalbyid', type: 'uuid', nullable: true })
|
||||
approvalbyid: string;
|
||||
|
||||
// @OneToOne(() => User, { nullable: true })
|
||||
// @JoinColumn({ name: 'approvalbyid' })
|
||||
// approvalby: User
|
||||
@Column({ name: 'approvalbyid', type: 'uuid', nullable: true })
|
||||
approvalbyid: string;
|
||||
|
||||
// @OneToOne(() => User, { nullable: true })
|
||||
// @JoinColumn({ name: 'approvalbyid' })
|
||||
// approvalby: User
|
||||
|
||||
@Column({ name: 'approvaldate', nullable: true })
|
||||
approvaldate: Date;
|
||||
|
||||
@Column({ name: 'dispositionbyid', type: 'uuid', nullable: true })
|
||||
dispositionbyid: string;
|
||||
|
||||
// @OneToOne(() => User, { nullable: true })
|
||||
// @JoinColumn({ name: 'dispositionbyid' })
|
||||
// dispositionby: User
|
||||
@Column({ name: 'dispositionbyid', type: 'uuid', nullable: true })
|
||||
dispositionbyid: string;
|
||||
|
||||
// @OneToOne(() => User, { nullable: true })
|
||||
// @JoinColumn({ name: 'dispositionbyid' })
|
||||
// dispositionby: User
|
||||
|
||||
@Column({ name: 'dispositiondate', nullable: true })
|
||||
dispositiondate: Date;
|
||||
|
||||
@Column({ name: 'attachdoc', nullable: true })
|
||||
attachdoc: string;
|
||||
|
||||
attachdoc: string;
|
||||
|
||||
@Column({ name: 'attachdocurl', nullable: true })
|
||||
attachdocurl: string;
|
||||
|
||||
attachdocurl: string;
|
||||
|
||||
@Column({ name: 'attachlink', nullable: true })
|
||||
attachlink: string;
|
||||
|
||||
attachlink: string;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
content: string;
|
||||
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
statusdoc: StatusDocument;
|
||||
|
||||
@ -74,10 +75,13 @@ export class EarchiveDoc {
|
||||
remarks: string;
|
||||
|
||||
@OneToMany(() => EarchiveDocLogs, (ipo) => ipo.docs, {
|
||||
cascade: false,
|
||||
nullable: true,
|
||||
})
|
||||
logs: EarchiveDocLogs;
|
||||
cascade: false,
|
||||
nullable: true,
|
||||
})
|
||||
logs: EarchiveDocLogs;
|
||||
|
||||
@OneToMany(() => EarchiveReceiver, (r) => r.doc)
|
||||
receivers: EarchiveReceiver[];
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
|
||||
Reference in New Issue
Block a user