import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CrCouponConfigDetail } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-20 16:51
 */
interface CrCouponConfigDetailCU extends ConditionUtil<CrCouponConfigDetailCU>{
    UUID:FieldUtil<CrCouponConfigDetailCU>;
    CCC_ID:FieldUtil<CrCouponConfigDetailCU>;
    COUPON_CFG_ID:FieldUtil<CrCouponConfigDetailCU>;
    COUPON_NAME:FieldUtil<CrCouponConfigDetailCU>;
    COUPON_COUNT:FieldUtil<CrCouponConfigDetailCU>;
    DISCOUNT:FieldUtil<CrCouponConfigDetailCU>;
    MAX_DISCOUNT_AMOUNT:FieldUtil<CrCouponConfigDetailCU>;
    EXPIRE:FieldUtil<CrCouponConfigDetailCU>;
    CREATE_TIME:FieldUtil<CrCouponConfigDetailCU>;
    CREATOR:FieldUtil<CrCouponConfigDetailCU>;
    UPDATE_TIME:FieldUtil<CrCouponConfigDetailCU>;
    UPDATOR:FieldUtil<CrCouponConfigDetailCU>;
}

class CrCouponConfigDetailCUImpl extends ConditionUtilImpl<CrCouponConfigDetailCUImpl> implements CrCouponConfigDetailCU{ 
    newInstance(): CrCouponConfigDetailCUImpl {
        return new CrCouponConfigDetailCUImpl();
    } 
    get UUID(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('uuid','uuid','', this);
    }
    get CCC_ID(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('ccc_id','cccId','', this);
    }
    get COUPON_CFG_ID(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('coupon_cfg_id','couponCfgId','', this);
    }
    get COUPON_NAME(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('coupon_name','couponName','优惠券名称', this);
    }
    get COUPON_COUNT(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('coupon_count','couponCount','优惠券数目', this);
    }
    get DISCOUNT(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('discount','discount','折扣', this);
    }
    get MAX_DISCOUNT_AMOUNT(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('max_discount_amount','maxDiscountAmount','最高折扣金额(分)', this);
    }
    get EXPIRE(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('expire','expire','优惠券有效期（单位：天）', this);
    }
    get CREATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
    get CREATOR(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('creator','creator','', this);
    }
    get UPDATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('update_time','updateTime','', this);
    }
    get UPDATOR(): FieldUtil<CrCouponConfigDetailCU>{  
        return new FieldUtil('updator','updator','', this);
    }
}

@Singleton 
class CrCouponConfigDetailMU extends TableUtilImpl<CrCouponConfigDetailCU,CrCouponConfigDetail>{ 
    tableName  = 'cr_coupon_config_detail';
    tableFields  = ['uuid','ccc_id','coupon_cfg_id','coupon_name','coupon_count','discount','max_discount_amount','expire','create_time','creator','update_time','updator'];
    modelFields  = ['uuid','cccId','couponCfgId','couponName','couponCount','discount','maxDiscountAmount','expire','createTime','creator','updateTime','updator'];
    modelIdFields  = ['uuid'];
    tableIdFields  = ['uuid'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CrCouponConfigDetailCU {
        return new CrCouponConfigDetailCUImpl();
    }   

    static get UUID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('uuid','uuid','', new CrCouponConfigDetailCUImpl());
    }
    static get CCC_ID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('ccc_id','cccId','', new CrCouponConfigDetailCUImpl());
    }
    static get COUPON_CFG_ID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('coupon_cfg_id','couponCfgId','', new CrCouponConfigDetailCUImpl());
    }
    static get COUPON_NAME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('coupon_name','couponName','优惠券名称', new CrCouponConfigDetailCUImpl());
    }
    static get COUPON_COUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('coupon_count','couponCount','优惠券数目', new CrCouponConfigDetailCUImpl());
    }
    static get DISCOUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('discount','discount','折扣', new CrCouponConfigDetailCUImpl());
    }
    static get MAX_DISCOUNT_AMOUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('max_discount_amount','maxDiscountAmount','最高折扣金额(分)', new CrCouponConfigDetailCUImpl());
    }
    static get EXPIRE(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('expire','expire','优惠券有效期（单位：天）', new CrCouponConfigDetailCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('create_time','createTime','', new CrCouponConfigDetailCUImpl());
    }
    static get CREATOR(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('creator','creator','', new CrCouponConfigDetailCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('update_time','updateTime','', new CrCouponConfigDetailCUImpl());
    }
    static get UPDATOR(): FieldUtil<CrCouponConfigDetailCU>{ 
        return new FieldUtil('updator','updator','', new CrCouponConfigDetailCUImpl());
    }

    get UUID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.UUID;
    }
    get CCC_ID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.CCC_ID;
    }
    get COUPON_CFG_ID(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.COUPON_CFG_ID;
    }
    get COUPON_NAME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.COUPON_NAME;
    }
    get COUPON_COUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.COUPON_COUNT;
    }
    get DISCOUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.DISCOUNT;
    }
    get MAX_DISCOUNT_AMOUNT(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.MAX_DISCOUNT_AMOUNT;
    }
    get EXPIRE(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.EXPIRE;
    }
    get CREATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.CREATE_TIME;
    }
    get CREATOR(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.CREATOR;
    }
    get UPDATE_TIME(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.UPDATE_TIME;
    }
    get UPDATOR(): FieldUtil<CrCouponConfigDetailCU>{ 
        return CrCouponConfigDetailMU.UPDATOR;
    }
}
export {CrCouponConfigDetailMU, CrCouponConfigDetailCU}
