import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdThirdPartyUser } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-28 12:00
 */
interface AdThirdPartyUserCU extends ConditionUtil<AdThirdPartyUserCU>{
    ID:FieldUtil<AdThirdPartyUserCU>;
    NAME:FieldUtil<AdThirdPartyUserCU>;
    USERNAME:FieldUtil<AdThirdPartyUserCU>;
    PASSWORD:FieldUtil<AdThirdPartyUserCU>;
    CODE:FieldUtil<AdThirdPartyUserCU>;
    KEY:FieldUtil<AdThirdPartyUserCU>;
    KEY_OFFSET:FieldUtil<AdThirdPartyUserCU>;
    STATUS:FieldUtil<AdThirdPartyUserCU>;
    CREATE_TIME:FieldUtil<AdThirdPartyUserCU>;
    UPDATE_TIME:FieldUtil<AdThirdPartyUserCU>;
}

class AdThirdPartyUserCUImpl extends ConditionUtilImpl<AdThirdPartyUserCUImpl> implements AdThirdPartyUserCU{ 
    newInstance(): AdThirdPartyUserCUImpl {
        return new AdThirdPartyUserCUImpl();
    } 
    get ID(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('ID','id','主键id', this);
    }
    get NAME(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('NAME','name','第三方用户名称', this);
    }
    get USERNAME(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('USERNAME','username','用户名', this);
    }
    get PASSWORD(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('PASSWORD','password','密码', this);
    }
    get CODE(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('CODE','code','代码：1，远山；2，百家', this);
    }
    get KEY(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('KEY','key','密钥', this);
    }
    get KEY_OFFSET(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('KEY_OFFSET','keyOffset','密钥偏移量', this);
    }
    get STATUS(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('STATUS','status','状态：0，启用；1，禁用；2，删除', this);
    }
    get CREATE_TIME(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
    get UPDATE_TIME(): FieldUtil<AdThirdPartyUserCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','', this);
    }
}

@Singleton 
class AdThirdPartyUserMU extends TableUtilImpl<AdThirdPartyUserCU,AdThirdPartyUser>{ 
    tableName  = 'ad_third_party_user';
    tableFields  = ['id','name','username','password','code','key','key_offset','status','create_time','update_time'];
    modelFields  = ['id','name','username','password','code','key','keyOffset','status','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdThirdPartyUserCU {
        return new AdThirdPartyUserCUImpl();
    }   

    static get ID(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('ID','id','主键id', new AdThirdPartyUserCUImpl());
    }
    static get NAME(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('NAME','name','第三方用户名称', new AdThirdPartyUserCUImpl());
    }
    static get USERNAME(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('USERNAME','username','用户名', new AdThirdPartyUserCUImpl());
    }
    static get PASSWORD(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('PASSWORD','password','密码', new AdThirdPartyUserCUImpl());
    }
    static get CODE(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('CODE','code','代码：1，远山；2，百家', new AdThirdPartyUserCUImpl());
    }
    static get KEY(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('KEY','key','密钥', new AdThirdPartyUserCUImpl());
    }
    static get KEY_OFFSET(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('KEY_OFFSET','keyOffset','密钥偏移量', new AdThirdPartyUserCUImpl());
    }
    static get STATUS(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('STATUS','status','状态：0，启用；1，禁用；2，删除', new AdThirdPartyUserCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new AdThirdPartyUserCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<AdThirdPartyUserCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','', new AdThirdPartyUserCUImpl());
    }

    get ID(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.ID;
    }
    get NAME(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.NAME;
    }
    get USERNAME(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.USERNAME;
    }
    get PASSWORD(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.PASSWORD;
    }
    get CODE(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.CODE;
    }
    get KEY(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.KEY;
    }
    get KEY_OFFSET(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.KEY_OFFSET;
    }
    get STATUS(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.STATUS;
    }
    get CREATE_TIME(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<AdThirdPartyUserCU>{ 
        return AdThirdPartyUserMU.UPDATE_TIME;
    }
}
export {AdThirdPartyUserMU, AdThirdPartyUserCU}
