import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { AdThirdPartyParamRecord } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-20 13:55
 */
interface AdThirdPartyParamRecordCU extends ConditionUtil<AdThirdPartyParamRecordCU>{
    PARAM:FieldUtil<AdThirdPartyParamRecordCU>;
    CONTENT:FieldUtil<AdThirdPartyParamRecordCU>;
    PARTNER:FieldUtil<AdThirdPartyParamRecordCU>;
    CREATE_TIME:FieldUtil<AdThirdPartyParamRecordCU>;
}

class AdThirdPartyParamRecordCUImpl extends ConditionUtilImpl<AdThirdPartyParamRecordCUImpl> implements AdThirdPartyParamRecordCU{ 
    newInstance(): AdThirdPartyParamRecordCUImpl {
        return new AdThirdPartyParamRecordCUImpl();
    } 
    get PARAM(): FieldUtil<AdThirdPartyParamRecordCU>{  
        return new FieldUtil('PARAM','param','param参数', this);
    }
    get CONTENT(): FieldUtil<AdThirdPartyParamRecordCU>{  
        return new FieldUtil('CONTENT','content','广告内容', this);
    }
    get PARTNER(): FieldUtil<AdThirdPartyParamRecordCU>{  
        return new FieldUtil('PARTNER','partner','合作方：1，远山', this);
    }
    get CREATE_TIME(): FieldUtil<AdThirdPartyParamRecordCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
}

@Singleton 
class AdThirdPartyParamRecordMU extends TableUtilImpl<AdThirdPartyParamRecordCU,AdThirdPartyParamRecord>{ 
    tableName  = 'ad_third_party_param_record';
    tableFields  = ['param','content','partner','create_time'];
    modelFields  = ['param','content','partner','createTime'];
    modelIdFields  = ['param'];
    tableIdFields  = ['param'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): AdThirdPartyParamRecordCU {
        return new AdThirdPartyParamRecordCUImpl();
    }   

    static get PARAM(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return new FieldUtil('PARAM','param','param参数', new AdThirdPartyParamRecordCUImpl());
    }
    static get CONTENT(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return new FieldUtil('CONTENT','content','广告内容', new AdThirdPartyParamRecordCUImpl());
    }
    static get PARTNER(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return new FieldUtil('PARTNER','partner','合作方：1，远山', new AdThirdPartyParamRecordCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new AdThirdPartyParamRecordCUImpl());
    }

    get PARAM(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return AdThirdPartyParamRecordMU.PARAM;
    }
    get CONTENT(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return AdThirdPartyParamRecordMU.CONTENT;
    }
    get PARTNER(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return AdThirdPartyParamRecordMU.PARTNER;
    }
    get CREATE_TIME(): FieldUtil<AdThirdPartyParamRecordCU>{ 
        return AdThirdPartyParamRecordMU.CREATE_TIME;
    }
}
export {AdThirdPartyParamRecordMU, AdThirdPartyParamRecordCU}
