import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdInfo } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-08 23:19
 */
interface AdInfoCU extends ConditionUtil<AdInfoCU>{
    ID:FieldUtil<AdInfoCU>;
    NAME:FieldUtil<AdInfoCU>;
    DESCRIPION:FieldUtil<AdInfoCU>;
    URL:FieldUtil<AdInfoCU>;
    SOURCE:FieldUtil<AdInfoCU>;
    STATUS:FieldUtil<AdInfoCU>;
    CREATE_TIME:FieldUtil<AdInfoCU>;
    CREATOR:FieldUtil<AdInfoCU>;
    UPDATE_TIME:FieldUtil<AdInfoCU>;
    UPDATOR:FieldUtil<AdInfoCU>;
}

class AdInfoCUImpl extends ConditionUtilImpl<AdInfoCUImpl> implements AdInfoCU{ 
    newInstance(): AdInfoCUImpl {
        return new AdInfoCUImpl();
    } 
    get ID(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('ID','id','广告id', this);
    }
    get NAME(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('NAME','name','广告名称', this);
    }
    get DESCRIPION(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('DESCRIPION','descripion','广告描述', this);
    }
    get URL(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('URL','url','跳转链接', this);
    }
    get SOURCE(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('SOURCE','source','广告来源：1，后台；2，KOS', this);
    }
    get STATUS(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('STATUS','status','状态：0，启用；1，删除', this);
    }
    get CREATE_TIME(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get CREATOR(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('CREATOR','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<AdInfoCU>{  
        return new FieldUtil('UPDATOR','updator','', this);
    }
}

@Singleton 
class AdInfoMU extends TableUtilImpl<AdInfoCU,AdInfo>{ 
    tableName  = 'ad_info';
    tableFields  = ['id','name','descripion','url','source','status','create_time','creator','update_time','updator'];
    modelFields  = ['id','name','descripion','url','source','status','createTime','creator','updateTime','updator'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdInfoCU {
        return new AdInfoCUImpl();
    }   

    static get ID(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('ID','id','广告id', new AdInfoCUImpl());
    }
    static get NAME(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('NAME','name','广告名称', new AdInfoCUImpl());
    }
    static get DESCRIPION(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('DESCRIPION','descripion','广告描述', new AdInfoCUImpl());
    }
    static get URL(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('URL','url','跳转链接', new AdInfoCUImpl());
    }
    static get SOURCE(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('SOURCE','source','广告来源：1，后台；2，KOS', new AdInfoCUImpl());
    }
    static get STATUS(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('STATUS','status','状态：0，启用；1，删除', new AdInfoCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new AdInfoCUImpl());
    }
    static get CREATOR(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('CREATOR','creator','', new AdInfoCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new AdInfoCUImpl());
    }
    static get UPDATOR(): FieldUtil<AdInfoCU>{ 
        return new FieldUtil('UPDATOR','updator','', new AdInfoCUImpl());
    }

    get ID(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.ID;
    }
    get NAME(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.NAME;
    }
    get DESCRIPION(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.DESCRIPION;
    }
    get URL(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.URL;
    }
    get SOURCE(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.SOURCE;
    }
    get STATUS(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.STATUS;
    }
    get CREATE_TIME(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<AdInfoCU>{ 
        return AdInfoMU.UPDATOR;
    }
}
export {AdInfoMU, AdInfoCU}
