import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { TestPlateModel } from '../models/index' 
/**
 * @author auto generate
 * @version 1.1
 * @date 2023-04-25 14:24
 */
interface TestPlateModelCU extends ConditionUtil<TestPlateModelCU>{
    ID:FieldUtil<TestPlateModelCU>;
    PLATENO:FieldUtil<TestPlateModelCU>;
    PARKID:FieldUtil<TestPlateModelCU>;
}

class TestPlateModelCUImpl extends ConditionUtilImpl<TestPlateModelCUImpl> implements TestPlateModelCU{ 
    newInstance(): TestPlateModelCUImpl {
        return new TestPlateModelCUImpl();
    } 
    get ID(): FieldUtil<TestPlateModelCU>{  
        return new FieldUtil('id','id','', this);
    }
    get PLATENO(): FieldUtil<TestPlateModelCU>{  
        return new FieldUtil('plateNo','plateno','', this);
    }
    get PARKID(): FieldUtil<TestPlateModelCU>{  
        return new FieldUtil('parkId','parkid','', this);
    }
}

@Singleton 
class TestPlateModelMU extends TableUtilImpl<TestPlateModelCU,TestPlateModel>{ 
    tableName  = 'test_plate_model';
    tableFields  = ['id','plateNo','parkId'];
    modelFields  = ['id','plateno','parkid'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): TestPlateModelCU {
        return new TestPlateModelCUImpl();
    }   

    static get ID(): FieldUtil<TestPlateModelCU>{ 
        return new FieldUtil('id','id','', new TestPlateModelCUImpl());
    }
    static get PLATENO(): FieldUtil<TestPlateModelCU>{ 
        return new FieldUtil('plateNo','plateno','', new TestPlateModelCUImpl());
    }
    static get PARKID(): FieldUtil<TestPlateModelCU>{ 
        return new FieldUtil('parkId','parkid','', new TestPlateModelCUImpl());
    }

    get ID(): FieldUtil<TestPlateModelCU>{ 
        return TestPlateModelMU.ID;
    }
    get PLATENO(): FieldUtil<TestPlateModelCU>{ 
        return TestPlateModelMU.PLATENO;
    }
    get PARKID(): FieldUtil<TestPlateModelCU>{ 
        return TestPlateModelMU.PARKID;
    }
}
export {TestPlateModelMU, TestPlateModelCU}
