import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MaDrawPrizeRecord } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-24 13:44
 */
interface MaDrawPrizeRecordCU extends ConditionUtil<MaDrawPrizeRecordCU>{
    ID:FieldUtil<MaDrawPrizeRecordCU>;
    PRIZE_ID:FieldUtil<MaDrawPrizeRecordCU>;
    PRIZE_INFO:FieldUtil<MaDrawPrizeRecordCU>;
    DRAW_CFG_ID:FieldUtil<MaDrawPrizeRecordCU>;
    USER_ID:FieldUtil<MaDrawPrizeRecordCU>;
    OPEN_ID:FieldUtil<MaDrawPrizeRecordCU>;
    PHONE:FieldUtil<MaDrawPrizeRecordCU>;
    USER_TYPE:FieldUtil<MaDrawPrizeRecordCU>;
    DRAW_STATUS:FieldUtil<MaDrawPrizeRecordCU>;
    WIN_STATUS:FieldUtil<MaDrawPrizeRecordCU>;
    REMARK:FieldUtil<MaDrawPrizeRecordCU>;
    CREATE_TIME:FieldUtil<MaDrawPrizeRecordCU>;
    UPDATE_TIME:FieldUtil<MaDrawPrizeRecordCU>;
}

class MaDrawPrizeRecordCUImpl extends ConditionUtilImpl<MaDrawPrizeRecordCUImpl> implements MaDrawPrizeRecordCU{ 
    newInstance(): MaDrawPrizeRecordCUImpl {
        return new MaDrawPrizeRecordCUImpl();
    } 
    get ID(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('ID','id','唯一标识', this);
    }
    get PRIZE_ID(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('PRIZE_ID','prizeId','奖品ID', this);
    }
    get PRIZE_INFO(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('PRIZE_INFO','prizeInfo','奖品信息', this);
    }
    get DRAW_CFG_ID(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('DRAW_CFG_ID','drawCfgId','抽奖活动Id', this);
    }
    get USER_ID(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('USER_ID','userId','用户标识', this);
    }
    get OPEN_ID(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('OPEN_ID','openId','微OpenID', this);
    }
    get PHONE(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('PHONE','phone','手机号', this);
    }
    get USER_TYPE(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('USER_TYPE','userType','用户类型： 01真实用户，02虚拟用户', this);
    }
    get DRAW_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('DRAW_STATUS','drawStatus','中奖状态： 00中奖，01未中奖', this);
    }
    get WIN_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('WIN_STATUS','winStatus','领奖状态： 00已领取，01未领取', this);
    }
    get REMARK(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
    get CREATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class MaDrawPrizeRecordMU extends TableUtilImpl<MaDrawPrizeRecordCU,MaDrawPrizeRecord>{ 
    tableName  = 'ma_draw_prize_record';
    tableFields  = ['ID','PRIZE_ID','PRIZE_INFO','DRAW_CFG_ID','USER_ID','OPEN_ID','PHONE','USER_TYPE','DRAW_STATUS','WIN_STATUS','REMARK','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['id','prizeId','prizeInfo','drawCfgId','userId','openId','phone','userType','drawStatus','winStatus','remark','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MaDrawPrizeRecordCU {
        return new MaDrawPrizeRecordCUImpl();
    }   

    static get ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('ID','id','唯一标识', new MaDrawPrizeRecordCUImpl());
    }
    static get PRIZE_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('PRIZE_ID','prizeId','奖品ID', new MaDrawPrizeRecordCUImpl());
    }
    static get PRIZE_INFO(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('PRIZE_INFO','prizeInfo','奖品信息', new MaDrawPrizeRecordCUImpl());
    }
    static get DRAW_CFG_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('DRAW_CFG_ID','drawCfgId','抽奖活动Id', new MaDrawPrizeRecordCUImpl());
    }
    static get USER_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('USER_ID','userId','用户标识', new MaDrawPrizeRecordCUImpl());
    }
    static get OPEN_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('OPEN_ID','openId','微OpenID', new MaDrawPrizeRecordCUImpl());
    }
    static get PHONE(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('PHONE','phone','手机号', new MaDrawPrizeRecordCUImpl());
    }
    static get USER_TYPE(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('USER_TYPE','userType','用户类型： 01真实用户，02虚拟用户', new MaDrawPrizeRecordCUImpl());
    }
    static get DRAW_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('DRAW_STATUS','drawStatus','中奖状态： 00中奖，01未中奖', new MaDrawPrizeRecordCUImpl());
    }
    static get WIN_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('WIN_STATUS','winStatus','领奖状态： 00已领取，01未领取', new MaDrawPrizeRecordCUImpl());
    }
    static get REMARK(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('REMARK','remark','备注', new MaDrawPrizeRecordCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new MaDrawPrizeRecordCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new MaDrawPrizeRecordCUImpl());
    }

    get ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.ID;
    }
    get PRIZE_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.PRIZE_ID;
    }
    get PRIZE_INFO(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.PRIZE_INFO;
    }
    get DRAW_CFG_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.DRAW_CFG_ID;
    }
    get USER_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.USER_ID;
    }
    get OPEN_ID(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.OPEN_ID;
    }
    get PHONE(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.PHONE;
    }
    get USER_TYPE(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.USER_TYPE;
    }
    get DRAW_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.DRAW_STATUS;
    }
    get WIN_STATUS(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.WIN_STATUS;
    }
    get REMARK(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MaDrawPrizeRecordCU>{ 
        return MaDrawPrizeRecordMU.UPDATE_TIME;
    }
}
export {MaDrawPrizeRecordMU, MaDrawPrizeRecordCU}
