import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { FawvwLotReplace } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-12-13 14:52
 */
interface FawvwLotReplaceCU extends ConditionUtil<FawvwLotReplaceCU>{
    LOT_ID:FieldUtil<FawvwLotReplaceCU>;
    LOT_NAME:FieldUtil<FawvwLotReplaceCU>;
    REPLACE_LOT_NAME:FieldUtil<FawvwLotReplaceCU>;
}

class FawvwLotReplaceCUImpl extends ConditionUtilImpl<FawvwLotReplaceCUImpl> implements FawvwLotReplaceCU{ 
    newInstance(): FawvwLotReplaceCUImpl {
        return new FawvwLotReplaceCUImpl();
    } 
    get LOT_ID(): FieldUtil<FawvwLotReplaceCU>{  
        return new FieldUtil('LOT_ID','lotId','车场ID', this);
    }
    get LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{  
        return new FieldUtil('LOT_NAME','lotName','车场名称', this);
    }
    get REPLACE_LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{  
        return new FieldUtil('REPLACE_LOT_NAME','replaceLotName','替换车场ID', this);
    }
}

@Singleton 
class FawvwLotReplaceMU extends TableUtilImpl<FawvwLotReplaceCU,FawvwLotReplace>{ 
    tableName  = 'fawvw_lot_replace';
    tableFields  = ['LOT_ID','LOT_NAME','REPLACE_LOT_NAME'];
    modelFields  = ['lotId','lotName','replaceLotName'];
    modelIdFields  = ['lotId'];
    tableIdFields  = ['LOT_ID'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): FawvwLotReplaceCU {
        return new FawvwLotReplaceCUImpl();
    }   

    static get LOT_ID(): FieldUtil<FawvwLotReplaceCU>{ 
        return new FieldUtil('LOT_ID','lotId','车场ID', new FawvwLotReplaceCUImpl());
    }
    static get LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{ 
        return new FieldUtil('LOT_NAME','lotName','车场名称', new FawvwLotReplaceCUImpl());
    }
    static get REPLACE_LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{ 
        return new FieldUtil('REPLACE_LOT_NAME','replaceLotName','替换车场ID', new FawvwLotReplaceCUImpl());
    }

    get LOT_ID(): FieldUtil<FawvwLotReplaceCU>{ 
        return FawvwLotReplaceMU.LOT_ID;
    }
    get LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{ 
        return FawvwLotReplaceMU.LOT_NAME;
    }
    get REPLACE_LOT_NAME(): FieldUtil<FawvwLotReplaceCU>{ 
        return FawvwLotReplaceMU.REPLACE_LOT_NAME;
    }
}
export {FawvwLotReplaceMU, FawvwLotReplaceCU}
