import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { BusUserCar } from '../models/index' 
/**
 * @author auto generate
 * @version 1.1
 * @date 2022-06-08 14:18
 */
interface BusUserCarCU extends ConditionUtil<BusUserCarCU>{
    ID:FieldUtil<BusUserCarCU>;
    USER_ID:FieldUtil<BusUserCarCU>;
    CAR_PLATE_NUM:FieldUtil<BusUserCarCU>;
    TYPE:FieldUtil<BusUserCarCU>;
    CREATE_TIME:FieldUtil<BusUserCarCU>;
    UPDATE_TIME:FieldUtil<BusUserCarCU>;
}

class BusUserCarCUImpl extends ConditionUtilImpl<BusUserCarCUImpl> implements BusUserCarCU{ 
    newInstance(): BusUserCarCUImpl {
        return new BusUserCarCUImpl();
    } 
    get ID(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('ID','id','唯一标识', this);
    }
    get USER_ID(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('USER_ID','userId','', this);
    }
    get CAR_PLATE_NUM(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','', this);
    }
    get TYPE(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('TYPE','type','车牌类型，01：蓝牌，02：黄牌，03：新能源', this);
    }
    get CREATE_TIME(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<BusUserCarCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
}

@Singleton 
class BusUserCarMU extends TableUtilImpl<BusUserCarCU,BusUserCar>{ 
    tableName  = 'bus_user_car';
    tableFields  = ['ID','USER_ID','CAR_PLATE_NUM','TYPE','CREATE_TIME','UPDATE_TIME'];
    modelFields  = ['id','userId','carPlateNum','type','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): BusUserCarCU {
        return new BusUserCarCUImpl();
    }   

    static get ID(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('ID','id','唯一标识', new BusUserCarCUImpl());
    }
    static get USER_ID(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('USER_ID','userId','', new BusUserCarCUImpl());
    }
    static get CAR_PLATE_NUM(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('CAR_PLATE_NUM','carPlateNum','', new BusUserCarCUImpl());
    }
    static get TYPE(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('TYPE','type','车牌类型，01：蓝牌，02：黄牌，03：新能源', new BusUserCarCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BusUserCarCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BusUserCarCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BusUserCarCUImpl());
    }

    get ID(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.ID;
    }
    get USER_ID(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.USER_ID;
    }
    get CAR_PLATE_NUM(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.CAR_PLATE_NUM;
    }
    get TYPE(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.TYPE;
    }
    get CREATE_TIME(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<BusUserCarCU>{ 
        return BusUserCarMU.UPDATE_TIME;
    }
}
export {BusUserCarMU, BusUserCarCU}
