import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusBlackLpn } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-01-26 17:22
 */
interface BusBlackLpnCU extends ConditionUtil<BusBlackLpnCU>{
    CAR_PLATE_NUM:FieldUtil<BusBlackLpnCU>;
    CODE:FieldUtil<BusBlackLpnCU>;
    CREATE_TIME:FieldUtil<BusBlackLpnCU>;
    UPDATE_TIME:FieldUtil<BusBlackLpnCU>;
}

class BusBlackLpnCUImpl extends ConditionUtilImpl<BusBlackLpnCUImpl> implements BusBlackLpnCU{ 
    newInstance(): BusBlackLpnCUImpl {
        return new BusBlackLpnCUImpl();
    } 
    get CAR_PLATE_NUM(): FieldUtil<BusBlackLpnCU>{  
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','车牌号', this);
    }
    get CODE(): FieldUtil<BusBlackLpnCU>{  
        return new FieldUtil('CODE','code','01:入场消息', this);
    }
    get CREATE_TIME(): FieldUtil<BusBlackLpnCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<BusBlackLpnCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class BusBlackLpnMU extends TableUtilImpl<BusBlackLpnCU,BusBlackLpn>{ 
    tableName  = 'bus_black_lpn';
    tableFields  = ['CAR_PLATE_NUM','CODE','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['carPlateNum','code','createTime','updateTime'];
    modelIdFields  = ['carPlateNum','code'];
    tableIdFields  = ['CAR_PLATE_NUM','CODE'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusBlackLpnCU {
        return new BusBlackLpnCUImpl();
    }   

    static get CAR_PLATE_NUM(): FieldUtil<BusBlackLpnCU>{ 
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','车牌号', new BusBlackLpnCUImpl());
    }
    static get CODE(): FieldUtil<BusBlackLpnCU>{ 
        return new FieldUtil('CODE','code','01:入场消息', new BusBlackLpnCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusBlackLpnCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusBlackLpnCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BusBlackLpnCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BusBlackLpnCUImpl());
    }

    get CAR_PLATE_NUM(): FieldUtil<BusBlackLpnCU>{ 
        return BusBlackLpnMU.CAR_PLATE_NUM;
    }
    get CODE(): FieldUtil<BusBlackLpnCU>{ 
        return BusBlackLpnMU.CODE;
    }
    get CREATE_TIME(): FieldUtil<BusBlackLpnCU>{ 
        return BusBlackLpnMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<BusBlackLpnCU>{ 
        return BusBlackLpnMU.UPDATE_TIME;
    }
}
export {BusBlackLpnMU, BusBlackLpnCU}
