import {BaseEntity,Entity,Column,Id,OneToMany,EntityProxy} from 'relaen'; import {AmOrgItem} from './amorgitem'; import {AmProperty} from './amproperty'; @Entity('AM_MODEL') export class AmModel extends BaseEntity{ @Id() @Column({ name:'MODEL_ID', type:'int', nullable:false }) public modelId:number; @Column({ name:'MODEL_NAME', type:'string', nullable:true, length:128 }) public modelName:string; @Column({ name:'SHOW_NAME', type:'string', nullable:true, length:128 }) public showName:string; @Column({ name:'REF_ENTITY', type:'string', nullable:true, length:128 }) public refEntity:string; @Column({ name:'IS_DATA', type:'int', nullable:true }) public isData:number; @Column({ name:'IS_COND', type:'int', nullable:true }) public isCond:number; @Column({ name:'EDITABLE', type:'int', nullable:true }) public editable:number; @Column({ name:'MANAGABLE', type:'int', nullable:true }) public managable:number; @Column({ name:'IS_STATUS', type:'int', nullable:true }) public isStatus:number; @OneToMany({ entity:'AmOrgItem', mappedBy:'amModel' }) public amOrgItems:Array; @OneToMany({ entity:'AmProperty', mappedBy:'amModel' }) public amPropertys:Array; @OneToMany({ entity:'AmStatusData', mappedBy:'statusModel' }) public statusModels:Array; @OneToMany({ entity:'AmStatusData', mappedBy:'dataModel' }) public dataModels:Array; constructor(idValue?:number){ super(); this.modelId = idValue; } public async getAmOrgItems():Promise>{ return this['amOrgItems']?this['amOrgItems']:await EntityProxy.get(this,'amOrgItems'); } public async getAmPropertys():Promise>{ return this['amPropertys']?this['amPropertys']:await EntityProxy.get(this,'amPropertys'); } }