import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusCouponUser } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-19 17:45
 */
interface BusCouponUserCU extends ConditionUtil<BusCouponUserCU>{
    ID:FieldUtil<BusCouponUserCU>;
    COUPON_INFO_ID:FieldUtil<BusCouponUserCU>;
    COUPON_CODE:FieldUtil<BusCouponUserCU>;
    USER_ID:FieldUtil<BusCouponUserCU>;
    STATUS:FieldUtil<BusCouponUserCU>;
    GET_TIME:FieldUtil<BusCouponUserCU>;
    USE_TIME:FieldUtil<BusCouponUserCU>;
    DISABLE_TIME:FieldUtil<BusCouponUserCU>;
    ATTACH:FieldUtil<BusCouponUserCU>;
    CREATE_TIME:FieldUtil<BusCouponUserCU>;
    UPDATE_TIME:FieldUtil<BusCouponUserCU>;
}

class BusCouponUserCUImpl extends ConditionUtilImpl<BusCouponUserCUImpl> implements BusCouponUserCU{ 
    newInstance(): BusCouponUserCUImpl {
        return new BusCouponUserCUImpl();
    } 
    get ID(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('ID','id','唯一标识', this);
    }
    get COUPON_INFO_ID(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('COUPON_INFO_ID','couponInfoId','', this);
    }
    get COUPON_CODE(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('COUPON_CODE','couponCode','抵用券编码', this);
    }
    get USER_ID(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('USER_ID','userId','', this);
    }
    get STATUS(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('STATUS','status','00:未领取,01:已使用,02:未使用:03::已过期,04:已失效', this);
    }
    get GET_TIME(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('GET_TIME','getTime','', this);
    }
    get USE_TIME(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('USE_TIME','useTime','', this);
    }
    get DISABLE_TIME(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('DISABLE_TIME','disableTime','', this);
    }
    get ATTACH(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('ATTACH','attach','附加数据', this);
    }
    get CREATE_TIME(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<BusCouponUserCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class BusCouponUserMU extends TableUtilImpl<BusCouponUserCU,BusCouponUser>{ 
    tableName  = 'bus_coupon_user';
    tableFields  = ['ID','COUPON_INFO_ID','COUPON_CODE','USER_ID','STATUS','GET_TIME','USE_TIME','DISABLE_TIME','ATTACH','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['id','couponInfoId','couponCode','userId','status','getTime','useTime','disableTime','attach','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusCouponUserCU {
        return new BusCouponUserCUImpl();
    }   

    static get ID(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('ID','id','唯一标识', new BusCouponUserCUImpl());
    }
    static get COUPON_INFO_ID(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('COUPON_INFO_ID','couponInfoId','', new BusCouponUserCUImpl());
    }
    static get COUPON_CODE(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('COUPON_CODE','couponCode','抵用券编码', new BusCouponUserCUImpl());
    }
    static get USER_ID(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('USER_ID','userId','', new BusCouponUserCUImpl());
    }
    static get STATUS(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('STATUS','status','00:未领取,01:已使用,02:未使用:03::已过期,04:已失效', new BusCouponUserCUImpl());
    }
    static get GET_TIME(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('GET_TIME','getTime','', new BusCouponUserCUImpl());
    }
    static get USE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('USE_TIME','useTime','', new BusCouponUserCUImpl());
    }
    static get DISABLE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('DISABLE_TIME','disableTime','', new BusCouponUserCUImpl());
    }
    static get ATTACH(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('ATTACH','attach','附加数据', new BusCouponUserCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusCouponUserCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BusCouponUserCUImpl());
    }

    get ID(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.ID;
    }
    get COUPON_INFO_ID(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.COUPON_INFO_ID;
    }
    get COUPON_CODE(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.COUPON_CODE;
    }
    get USER_ID(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.USER_ID;
    }
    get STATUS(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.STATUS;
    }
    get GET_TIME(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.GET_TIME;
    }
    get USE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.USE_TIME;
    }
    get DISABLE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.DISABLE_TIME;
    }
    get ATTACH(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.ATTACH;
    }
    get CREATE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<BusCouponUserCU>{ 
        return BusCouponUserMU.UPDATE_TIME;
    }
}
export {BusCouponUserMU, BusCouponUserCU}
