import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { FawvwCouponLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-12-03 13:28
 */
interface FawvwCouponLogCU extends ConditionUtil<FawvwCouponLogCU>{
    ID:FieldUtil<FawvwCouponLogCU>;
    USER_ID:FieldUtil<FawvwCouponLogCU>;
    COUPON_CONFIG_ID:FieldUtil<FawvwCouponLogCU>;
    STATE:FieldUtil<FawvwCouponLogCU>;
    CREATE_TIME:FieldUtil<FawvwCouponLogCU>;
}

class FawvwCouponLogCUImpl extends ConditionUtilImpl<FawvwCouponLogCUImpl> implements FawvwCouponLogCU{ 
    newInstance(): FawvwCouponLogCUImpl {
        return new FawvwCouponLogCUImpl();
    } 
    get ID(): FieldUtil<FawvwCouponLogCU>{  
        return new FieldUtil('ID','id','ID', this);
    }
    get USER_ID(): FieldUtil<FawvwCouponLogCU>{  
        return new FieldUtil('USER_ID','userId','用户ID', this);
    }
    get COUPON_CONFIG_ID(): FieldUtil<FawvwCouponLogCU>{  
        return new FieldUtil('COUPON_CONFIG_ID','couponConfigId','优惠券配置ID', this);
    }
    get STATE(): FieldUtil<FawvwCouponLogCU>{  
        return new FieldUtil('STATE','state','状态：00 发券成功；01 发券失败', this);
    }
    get CREATE_TIME(): FieldUtil<FawvwCouponLogCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
}

@Singleton 
class FawvwCouponLogMU extends TableUtilImpl<FawvwCouponLogCU,FawvwCouponLog>{ 
    tableName  = 'fawvw_coupon_log';
    tableFields  = ['ID','USER_ID','COUPON_CONFIG_ID','STATE','CREATE_TIME'];
    modelFields  = ['id','userId','couponConfigId','state','createTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): FawvwCouponLogCU {
        return new FawvwCouponLogCUImpl();
    }   

    static get ID(): FieldUtil<FawvwCouponLogCU>{ 
        return new FieldUtil('ID','id','ID', new FawvwCouponLogCUImpl());
    }
    static get USER_ID(): FieldUtil<FawvwCouponLogCU>{ 
        return new FieldUtil('USER_ID','userId','用户ID', new FawvwCouponLogCUImpl());
    }
    static get COUPON_CONFIG_ID(): FieldUtil<FawvwCouponLogCU>{ 
        return new FieldUtil('COUPON_CONFIG_ID','couponConfigId','优惠券配置ID', new FawvwCouponLogCUImpl());
    }
    static get STATE(): FieldUtil<FawvwCouponLogCU>{ 
        return new FieldUtil('STATE','state','状态：00 发券成功；01 发券失败', new FawvwCouponLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<FawvwCouponLogCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new FawvwCouponLogCUImpl());
    }

    get ID(): FieldUtil<FawvwCouponLogCU>{ 
        return FawvwCouponLogMU.ID;
    }
    get USER_ID(): FieldUtil<FawvwCouponLogCU>{ 
        return FawvwCouponLogMU.USER_ID;
    }
    get COUPON_CONFIG_ID(): FieldUtil<FawvwCouponLogCU>{ 
        return FawvwCouponLogMU.COUPON_CONFIG_ID;
    }
    get STATE(): FieldUtil<FawvwCouponLogCU>{ 
        return FawvwCouponLogMU.STATE;
    }
    get CREATE_TIME(): FieldUtil<FawvwCouponLogCU>{ 
        return FawvwCouponLogMU.CREATE_TIME;
    }
}
export {FawvwCouponLogMU, FawvwCouponLogCU}
