import {BaseEntity,Entity,Column,Id,JoinColumn,ManyToOne,OneToMany,EntityProxy} from 'relaen'; import {AmFileType} from './amfiletype'; import {AmAlgorithm} from './amalgorithm'; import {AmImportTemplate} from './amimporttemplate'; import {AmImportRes} from './amimportres'; @Entity("AM_FILE") export class AmFile extends BaseEntity{ @Id() @Column({ name:'FILE_ID', type:'int', nullable:false }) public fileId:number; @ManyToOne({entity:'AmFileType'}) @JoinColumn({ name:'FILE_TYPE_ID', refName:'FILE_TYPE_ID', nullable:true }) public amFileType:AmFileType; @Column({ name:'FILE_NAME', type:'string', nullable:true, length:128 }) public fileName:string; @Column({ name:'SAVE_PATH', type:'string', nullable:true, length:1024 }) public savePath:string; @Column({ name:'DOWN_PATH', type:'string', nullable:true, length:1024 }) public downPath:string; @OneToMany({ entity:'AmAlgorithm', mappedBy:'amFile' }) public amAlgorithms:Array; @OneToMany({ entity:'AmImportTemplate', mappedBy:'amFileForDescribeFileId' }) public amImportTemplateForDescribeFileIds:Array; @OneToMany({ entity:'AmImportTemplate', mappedBy:'amFileForHandleFileId' }) public amImportTemplateForHandleFileIds:Array; constructor(idValue?:number){ super(); this.fileId = idValue; } public async getAmFileType():Promise{ return this['amFileType']?this['amFileType']:await EntityProxy.get(this,'amFileType'); } public async getAmAlgorithms():Promise>{ return this['amAlgorithms']?this['amAlgorithms']:await EntityProxy.get(this,'amAlgorithms'); } public async getAmImportTemplateForDescribeFileIds():Promise>{ return this['amImportTemplateForDescribeFileIds']?this['amImportTemplateForDescribeFileIds']:await EntityProxy.get(this,'amImportTemplateForDescribeFileIds'); } public async getAmImportTemplateForHandleFileIds():Promise>{ return this['amImportTemplateForHandleFileIds']?this['amImportTemplateForHandleFileIds']:await EntityProxy.get(this,'amImportTemplateForHandleFileIds'); } }