import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CrMsgLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-12 15:49
 */
interface CrMsgLogCU extends ConditionUtil<CrMsgLogCU>{
    ID:FieldUtil<CrMsgLogCU>;
    MSG:FieldUtil<CrMsgLogCU>;
    CREATE_TIME:FieldUtil<CrMsgLogCU>;
    USER_ID:FieldUtil<CrMsgLogCU>;
    AD_ID:FieldUtil<CrMsgLogCU>;
    SEND_STATUS:FieldUtil<CrMsgLogCU>;
    SEND_ERROR_DESC:FieldUtil<CrMsgLogCU>;
    SEND_RESULT:FieldUtil<CrMsgLogCU>;
    SEND_TIME:FieldUtil<CrMsgLogCU>;
    UPDATE_TIME:FieldUtil<CrMsgLogCU>;
    FROM_APP:FieldUtil<CrMsgLogCU>;
}

class CrMsgLogCUImpl extends ConditionUtilImpl<CrMsgLogCUImpl> implements CrMsgLogCU{ 
    newInstance(): CrMsgLogCUImpl {
        return new CrMsgLogCUImpl();
    } 
    get ID(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('id','id','', this);
    }
    get MSG(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('msg','msg','', this);
    }
    get CREATE_TIME(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('create_time','createTime','', this);
    }
    get USER_ID(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('user_id','userId','用户id', this);
    }
    get AD_ID(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('ad_id','adId','广告id', this);
    }
    get SEND_STATUS(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('send_status','sendStatus','发送状态：0未发送；1已发送；2发送错误', this);
    }
    get SEND_ERROR_DESC(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('send_error_desc','sendErrorDesc','发送错误描述', this);
    }
    get SEND_RESULT(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('send_result','sendResult','发送结果', this);
    }
    get SEND_TIME(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('send_time','sendTime','发送时间', this);
    }
    get UPDATE_TIME(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
    get FROM_APP(): FieldUtil<CrMsgLogCU>{  
        return new FieldUtil('from_app','fromApp','消息来源', this);
    }
}

@Singleton 
class CrMsgLogMU extends TableUtilImpl<CrMsgLogCU,CrMsgLog>{ 
    tableName  = 'cr_msg_log';
    tableFields  = ['id','msg','create_time','user_id','ad_id','send_status','send_error_desc','send_result','send_time','update_time','from_app'];
    modelFields  = ['id','msg','createTime','userId','adId','sendStatus','sendErrorDesc','sendResult','sendTime','updateTime','fromApp'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CrMsgLogCU {
        return new CrMsgLogCUImpl();
    }   

    static get ID(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('id','id','', new CrMsgLogCUImpl());
    }
    static get MSG(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('msg','msg','', new CrMsgLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('create_time','createTime','', new CrMsgLogCUImpl());
    }
    static get USER_ID(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('user_id','userId','用户id', new CrMsgLogCUImpl());
    }
    static get AD_ID(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('ad_id','adId','广告id', new CrMsgLogCUImpl());
    }
    static get SEND_STATUS(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('send_status','sendStatus','发送状态：0未发送；1已发送；2发送错误', new CrMsgLogCUImpl());
    }
    static get SEND_ERROR_DESC(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('send_error_desc','sendErrorDesc','发送错误描述', new CrMsgLogCUImpl());
    }
    static get SEND_RESULT(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('send_result','sendResult','发送结果', new CrMsgLogCUImpl());
    }
    static get SEND_TIME(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('send_time','sendTime','发送时间', new CrMsgLogCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new CrMsgLogCUImpl());
    }
    static get FROM_APP(): FieldUtil<CrMsgLogCU>{ 
        return new FieldUtil('from_app','fromApp','消息来源', new CrMsgLogCUImpl());
    }

    get ID(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.ID;
    }
    get MSG(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.MSG;
    }
    get CREATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.CREATE_TIME;
    }
    get USER_ID(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.USER_ID;
    }
    get AD_ID(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.AD_ID;
    }
    get SEND_STATUS(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.SEND_STATUS;
    }
    get SEND_ERROR_DESC(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.SEND_ERROR_DESC;
    }
    get SEND_RESULT(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.SEND_RESULT;
    }
    get SEND_TIME(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.SEND_TIME;
    }
    get UPDATE_TIME(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.UPDATE_TIME;
    }
    get FROM_APP(): FieldUtil<CrMsgLogCU>{ 
        return CrMsgLogMU.FROM_APP;
    }
}
export {CrMsgLogMU, CrMsgLogCU}
