import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { SendRecord } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-11-06 11:37
 */
interface SendRecordCU extends ConditionUtil<SendRecordCU>{
    ID:FieldUtil<SendRecordCU>;
    TITLE:FieldUtil<SendRecordCU>;
    CONTENT_ID:FieldUtil<SendRecordCU>;
    SEND_CONFIG_ID:FieldUtil<SendRecordCU>;
    LOT_TYPE:FieldUtil<SendRecordCU>;
    SEND_LOT_AMOUNT:FieldUtil<SendRecordCU>;
    SEND_ROLE:FieldUtil<SendRecordCU>;
    SEND_RULE:FieldUtil<SendRecordCU>;
    STATUS:FieldUtil<SendRecordCU>;
    EFF_DATE:FieldUtil<SendRecordCU>;
    EXP_DATE:FieldUtil<SendRecordCU>;
    CREATE_TIME:FieldUtil<SendRecordCU>;
}

class SendRecordCUImpl extends ConditionUtilImpl<SendRecordCUImpl> implements SendRecordCU{ 
    newInstance(): SendRecordCUImpl {
        return new SendRecordCUImpl();
    } 
    get ID(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get TITLE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('TITLE','title','标题', this);
    }
    get CONTENT_ID(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('CONTENT_ID','contentId','发送内容id', this);
    }
    get SEND_CONFIG_ID(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('SEND_CONFIG_ID','sendConfigId','发送配置id', this);
    }
    get LOT_TYPE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('LOT_TYPE','lotType','车场类型 1 速泊车场', this);
    }
    get SEND_LOT_AMOUNT(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('SEND_LOT_AMOUNT','sendLotAmount','发送车场数', this);
    }
    get SEND_ROLE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('SEND_ROLE','sendRole','发送角色 1 不限 2 车场管理者 3boss 4 财务 5普通员工', this);
    }
    get SEND_RULE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('SEND_RULE','sendRule','发送规则 1.收费30天后 2.每季度10号', this);
    }
    get STATUS(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('STATUS','status','状态 1 正常 2 禁用 3.删除', this);
    }
    get EFF_DATE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('EFF_DATE','effDate','有效时间', this);
    }
    get EXP_DATE(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('EXP_DATE','expDate','失效日期', this);
    }
    get CREATE_TIME(): FieldUtil<SendRecordCU>{  
        return new FieldUtil('CREATE_TIME','createTime','', this);
    }
}

@Singleton 
class SendRecordMU extends TableUtilImpl<SendRecordCU,SendRecord>{ 
    tableName  = 'cq_send_record';
    tableFields  = ['id','title','content_id','send_config_id','lot_type','send_lot_amount','send_role','send_rule','status','eff_date','exp_date','create_time'];
    modelFields  = ['id','title','contentId','sendConfigId','lotType','sendLotAmount','sendRole','sendRule','status','effDate','expDate','createTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): SendRecordCU {
        return new SendRecordCUImpl();
    }   

    static get ID(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('ID','id','', new SendRecordCUImpl());
    }
    static get TITLE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('TITLE','title','标题', new SendRecordCUImpl());
    }
    static get CONTENT_ID(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('CONTENT_ID','contentId','发送内容id', new SendRecordCUImpl());
    }
    static get SEND_CONFIG_ID(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('SEND_CONFIG_ID','sendConfigId','发送配置id', new SendRecordCUImpl());
    }
    static get LOT_TYPE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('LOT_TYPE','lotType','车场类型 1 速泊车场', new SendRecordCUImpl());
    }
    static get SEND_LOT_AMOUNT(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('SEND_LOT_AMOUNT','sendLotAmount','发送车场数', new SendRecordCUImpl());
    }
    static get SEND_ROLE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('SEND_ROLE','sendRole','发送角色 1 不限 2 车场管理者 3boss 4 财务 5普通员工', new SendRecordCUImpl());
    }
    static get SEND_RULE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('SEND_RULE','sendRule','发送规则 1.收费30天后 2.每季度10号', new SendRecordCUImpl());
    }
    static get STATUS(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('STATUS','status','状态 1 正常 2 禁用 3.删除', new SendRecordCUImpl());
    }
    static get EFF_DATE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('EFF_DATE','effDate','有效时间', new SendRecordCUImpl());
    }
    static get EXP_DATE(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('EXP_DATE','expDate','失效日期', new SendRecordCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<SendRecordCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','', new SendRecordCUImpl());
    }

    get ID(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.ID;
    }
    get TITLE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.TITLE;
    }
    get CONTENT_ID(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.CONTENT_ID;
    }
    get SEND_CONFIG_ID(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.SEND_CONFIG_ID;
    }
    get LOT_TYPE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.LOT_TYPE;
    }
    get SEND_LOT_AMOUNT(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.SEND_LOT_AMOUNT;
    }
    get SEND_ROLE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.SEND_ROLE;
    }
    get SEND_RULE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.SEND_RULE;
    }
    get STATUS(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.STATUS;
    }
    get EFF_DATE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.EFF_DATE;
    }
    get EXP_DATE(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.EXP_DATE;
    }
    get CREATE_TIME(): FieldUtil<SendRecordCU>{ 
        return SendRecordMU.CREATE_TIME;
    }
}
export {SendRecordMU, SendRecordCU}
