import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CrCouponConfig } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-16 14:39
 */
interface CrCouponConfigCU extends ConditionUtil<CrCouponConfigCU>{
    UUID:FieldUtil<CrCouponConfigCU>;
    DEL_FLAG:FieldUtil<CrCouponConfigCU>;
    CREATE_TIME:FieldUtil<CrCouponConfigCU>;
    CREATOR:FieldUtil<CrCouponConfigCU>;
    UPDATE_TIME:FieldUtil<CrCouponConfigCU>;
    UPDATOR:FieldUtil<CrCouponConfigCU>;
    AD_INFO_ID:FieldUtil<CrCouponConfigCU>;
    ACTION_TYPE:FieldUtil<CrCouponConfigCU>;
}

class CrCouponConfigCUImpl extends ConditionUtilImpl<CrCouponConfigCUImpl> implements CrCouponConfigCU{ 
    newInstance(): CrCouponConfigCUImpl {
        return new CrCouponConfigCUImpl();
    } 
    get UUID(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('uuid','uuid','', this);
    }
    get DEL_FLAG(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('del_flag','delFlag','', this);
    }
    get CREATE_TIME(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
    get CREATOR(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('creator','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('update_time','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('updator','updator','', this);
    }
    get AD_INFO_ID(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('ad_info_id','adInfoId','广告id', this);
    }
    get ACTION_TYPE(): FieldUtil<CrCouponConfigCU>{  
        return new FieldUtil('action_type','actionType','成交类型', this);
    }
}

@Singleton 
class CrCouponConfigMU extends TableUtilImpl<CrCouponConfigCU,CrCouponConfig>{ 
    tableName  = 'cr_coupon_config';
    tableFields  = ['uuid','del_flag','create_time','creator','update_time','updator','ad_info_id','action_type'];
    modelFields  = ['uuid','delFlag','createTime','creator','updateTime','updator','adInfoId','actionType'];
    modelIdFields  = ['uuid'];
    tableIdFields  = ['uuid'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CrCouponConfigCU {
        return new CrCouponConfigCUImpl();
    }   

    static get UUID(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('uuid','uuid','', new CrCouponConfigCUImpl());
    }
    static get DEL_FLAG(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('del_flag','delFlag','', new CrCouponConfigCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('create_time','createTime','', new CrCouponConfigCUImpl());
    }
    static get CREATOR(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('creator','creator','', new CrCouponConfigCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('update_time','updateTime','', new CrCouponConfigCUImpl());
    }
    static get UPDATOR(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('updator','updator','', new CrCouponConfigCUImpl());
    }
    static get AD_INFO_ID(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('ad_info_id','adInfoId','广告id', new CrCouponConfigCUImpl());
    }
    static get ACTION_TYPE(): FieldUtil<CrCouponConfigCU>{ 
        return new FieldUtil('action_type','actionType','成交类型', new CrCouponConfigCUImpl());
    }

    get UUID(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.UUID;
    }
    get DEL_FLAG(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.DEL_FLAG;
    }
    get CREATE_TIME(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.UPDATOR;
    }
    get AD_INFO_ID(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.AD_INFO_ID;
    }
    get ACTION_TYPE(): FieldUtil<CrCouponConfigCU>{ 
        return CrCouponConfigMU.ACTION_TYPE;
    }
}
export {CrCouponConfigMU, CrCouponConfigCU}
