import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MaDrawConfig } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-24 13:44
 */
interface MaDrawConfigCU extends ConditionUtil<MaDrawConfigCU>{
    DRAW_CFG_ID:FieldUtil<MaDrawConfigCU>;
    DRAW_NAME:FieldUtil<MaDrawConfigCU>;
    DRAW_TYPE:FieldUtil<MaDrawConfigCU>;
    STATUS:FieldUtil<MaDrawConfigCU>;
    USER_SOURCE:FieldUtil<MaDrawConfigCU>;
    ACTIVITY_URL:FieldUtil<MaDrawConfigCU>;
    START_TIME:FieldUtil<MaDrawConfigCU>;
    END_TIME:FieldUtil<MaDrawConfigCU>;
    REMARK:FieldUtil<MaDrawConfigCU>;
    CREATE_TIME:FieldUtil<MaDrawConfigCU>;
    UPDATE_TIME:FieldUtil<MaDrawConfigCU>;
}

class MaDrawConfigCUImpl extends ConditionUtilImpl<MaDrawConfigCUImpl> implements MaDrawConfigCU{ 
    newInstance(): MaDrawConfigCUImpl {
        return new MaDrawConfigCUImpl();
    } 
    get DRAW_CFG_ID(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('DRAW_CFG_ID','drawCfgId','唯一标识', this);
    }
    get DRAW_NAME(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('DRAW_NAME','drawName','抽奖名称', this);
    }
    get DRAW_TYPE(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('DRAW_TYPE','drawType','抽奖类型01刮刮乐02大转盘', this);
    }
    get STATUS(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('STATUS','status','抽奖状态： 00有效，01无效', this);
    }
    get USER_SOURCE(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('USER_SOURCE','userSource','用户来源', this);
    }
    get ACTIVITY_URL(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('ACTIVITY_URL','activityUrl','活动链接', this);
    }
    get START_TIME(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('START_TIME','startTime','开始时间', this);
    }
    get END_TIME(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('END_TIME','endTime','结束时间', this);
    }
    get REMARK(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
    get CREATE_TIME(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<MaDrawConfigCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class MaDrawConfigMU extends TableUtilImpl<MaDrawConfigCU,MaDrawConfig>{ 
    tableName  = 'ma_draw_config';
    tableFields  = ['DRAW_CFG_ID','DRAW_NAME','DRAW_TYPE','STATUS','USER_SOURCE','ACTIVITY_URL','START_TIME','END_TIME','REMARK','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['drawCfgId','drawName','drawType','status','userSource','activityUrl','startTime','endTime','remark','createTime','updateTime'];
    modelIdFields  = ['drawCfgId'];
    tableIdFields  = ['DRAW_CFG_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MaDrawConfigCU {
        return new MaDrawConfigCUImpl();
    }   

    static get DRAW_CFG_ID(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('DRAW_CFG_ID','drawCfgId','唯一标识', new MaDrawConfigCUImpl());
    }
    static get DRAW_NAME(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('DRAW_NAME','drawName','抽奖名称', new MaDrawConfigCUImpl());
    }
    static get DRAW_TYPE(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('DRAW_TYPE','drawType','抽奖类型01刮刮乐02大转盘', new MaDrawConfigCUImpl());
    }
    static get STATUS(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('STATUS','status','抽奖状态： 00有效，01无效', new MaDrawConfigCUImpl());
    }
    static get USER_SOURCE(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('USER_SOURCE','userSource','用户来源', new MaDrawConfigCUImpl());
    }
    static get ACTIVITY_URL(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('ACTIVITY_URL','activityUrl','活动链接', new MaDrawConfigCUImpl());
    }
    static get START_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('START_TIME','startTime','开始时间', new MaDrawConfigCUImpl());
    }
    static get END_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('END_TIME','endTime','结束时间', new MaDrawConfigCUImpl());
    }
    static get REMARK(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('REMARK','remark','备注', new MaDrawConfigCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new MaDrawConfigCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new MaDrawConfigCUImpl());
    }

    get DRAW_CFG_ID(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.DRAW_CFG_ID;
    }
    get DRAW_NAME(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.DRAW_NAME;
    }
    get DRAW_TYPE(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.DRAW_TYPE;
    }
    get STATUS(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.STATUS;
    }
    get USER_SOURCE(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.USER_SOURCE;
    }
    get ACTIVITY_URL(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.ACTIVITY_URL;
    }
    get START_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.START_TIME;
    }
    get END_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.END_TIME;
    }
    get REMARK(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MaDrawConfigCU>{ 
        return MaDrawConfigMU.UPDATE_TIME;
    }
}
export {MaDrawConfigMU, MaDrawConfigCU}
