import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusoperationLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-04-01 18:12
 */
interface BusoperationLogCU extends ConditionUtil<BusoperationLogCU>{
    ID:FieldUtil<BusoperationLogCU>;
    USER_ID:FieldUtil<BusoperationLogCU>;
    LOT_ID:FieldUtil<BusoperationLogCU>;
    AD_CFG_ID:FieldUtil<BusoperationLogCU>;
    OPERATION_ID:FieldUtil<BusoperationLogCU>;
    NOTE:FieldUtil<BusoperationLogCU>;
    CREATE_TIME:FieldUtil<BusoperationLogCU>;
}

class BusoperationLogCUImpl extends ConditionUtilImpl<BusoperationLogCUImpl> implements BusoperationLogCU{ 
    newInstance(): BusoperationLogCUImpl {
        return new BusoperationLogCUImpl();
    } 
    get ID(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get USER_ID(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('USER_ID','userId','用户ID', this);
    }
    get LOT_ID(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('LOT_ID','lotId','车场ID', this);
    }
    get AD_CFG_ID(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('AD_CFG_ID','adCfgId','广告ID', this);
    }
    get OPERATION_ID(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('OPERATION_ID','operationId','操作类型，
ADS001:入场消息推送—成功,
ADS002:入场消息推送—失败,
ADS003:入', this);
    }
    get NOTE(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('NOTE','note','描述', this);
    }
    get CREATE_TIME(): FieldUtil<BusoperationLogCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
}

@Singleton 
class BusoperationLogMU extends TableUtilImpl<BusoperationLogCU,BusoperationLog>{ 
    tableName  = 'bus_operation_log';
    tableFields  = ['id','user_id','lot_id','ad_cfg_id','operation_id','note','create_time'];
    modelFields  = ['id','userId','lotId','adCfgId','operationId','note','createTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusoperationLogCU {
        return new BusoperationLogCUImpl();
    }   

    static get ID(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('ID','id','', new BusoperationLogCUImpl());
    }
    static get USER_ID(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('USER_ID','userId','用户ID', new BusoperationLogCUImpl());
    }
    static get LOT_ID(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场ID', new BusoperationLogCUImpl());
    }
    static get AD_CFG_ID(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('AD_CFG_ID','adCfgId','广告ID', new BusoperationLogCUImpl());
    }
    static get OPERATION_ID(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('OPERATION_ID','operationId','操作类型，
ADS001:入场消息推送—成功,
ADS002:入场消息推送—失败,
ADS003:入', new BusoperationLogCUImpl());
    }
    static get NOTE(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('NOTE','note','描述', new BusoperationLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusoperationLogCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusoperationLogCUImpl());
    }

    get ID(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.ID;
    }
    get USER_ID(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.USER_ID;
    }
    get LOT_ID(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.LOT_ID;
    }
    get AD_CFG_ID(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.AD_CFG_ID;
    }
    get OPERATION_ID(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.OPERATION_ID;
    }
    get NOTE(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.NOTE;
    }
    get CREATE_TIME(): FieldUtil<BusoperationLogCU>{ 
        return BusoperationLogMU.CREATE_TIME;
    }
}
export {BusoperationLogMU, BusoperationLogCU}
