import { PcdBaseEntity } from "src/framework/custom/pcd-entity.custom";
import { TenderMaster } from "src/tables/tender-master/tender-master.entity";
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";

@Entity('imp-doc')
export class ImportantDoc extends PcdBaseEntity{

    @PrimaryColumn({
        name:"id"
    })
    id:number
    @Column({
        name:"tender_id",
        type:"numeric",
        //length:500,
        nullable:true
    })
    tenderId:number
    @Column({
        name:"category",
        type:"varchar",
       length:500,
        nullable:true
    })
    category:string
    @Column({
        name:"sub_category",
        type:"varchar",
        length:500,
        nullable:true
    })
    subCategory:string
    @Column({
        name:"sub_category_desc",
        type:"varchar",
        length:500,
        nullable:true
    })
    subCategoryDesc:string

    @Column({
        name:"file_format",
        type:"varchar",
        length:500,
        nullable:true
    })
    fileFormat:string

    @ManyToOne(() => TenderMaster,(tenderMaster)=> tenderMaster.importantDoc)
    @JoinColumn([{ name: "tender_id", referencedColumnName: "id" }])
    tenderIdD:TenderMaster


}