import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { DevopsMsApp } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-05-20 14:05
 */
interface DevopsMsAppCU extends ConditionUtil<DevopsMsAppCU>{
    ID:FieldUtil<DevopsMsAppCU>;
    APP_NAME:FieldUtil<DevopsMsAppCU>;
    MS_PROJECT_NAME:FieldUtil<DevopsMsAppCU>;
    MS_PROJECT_ID:FieldUtil<DevopsMsAppCU>;
    MS_PROJECT_VERSION:FieldUtil<DevopsMsAppCU>;
}

class DevopsMsAppCUImpl extends ConditionUtilImpl<DevopsMsAppCUImpl> implements DevopsMsAppCU{ 
    newInstance(): DevopsMsAppCUImpl {
        return new DevopsMsAppCUImpl();
    } 
    get ID(): FieldUtil<DevopsMsAppCU>{  
        return new FieldUtil('id','id','', this);
    }
    get APP_NAME(): FieldUtil<DevopsMsAppCU>{  
        return new FieldUtil('app_name','appName','新版APP名称', this);
    }
    get MS_PROJECT_NAME(): FieldUtil<DevopsMsAppCU>{  
        return new FieldUtil('ms_project_name','msProjectName','中台1.0对应项目名称', this);
    }
    get MS_PROJECT_ID(): FieldUtil<DevopsMsAppCU>{  
        return new FieldUtil('ms_project_id','msProjectId','', this);
    }
    get MS_PROJECT_VERSION(): FieldUtil<DevopsMsAppCU>{  
        return new FieldUtil('ms_project_version','msProjectVersion','', this);
    }
}

@Singleton 
class DevopsMsAppMU extends TableUtilImpl<DevopsMsAppCU,DevopsMsApp>{ 
    tableName  = 'devops_ms_app';
    tableFields  = ['id','app_name','ms_project_name','ms_project_id','ms_project_version'];
    modelFields  = ['id','appName','msProjectName','msProjectId','msProjectVersion'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): DevopsMsAppCU {
        return new DevopsMsAppCUImpl();
    }   

    static get ID(): FieldUtil<DevopsMsAppCU>{ 
        return new FieldUtil('id','id','', new DevopsMsAppCUImpl());
    }
    static get APP_NAME(): FieldUtil<DevopsMsAppCU>{ 
        return new FieldUtil('app_name','appName','新版APP名称', new DevopsMsAppCUImpl());
    }
    static get MS_PROJECT_NAME(): FieldUtil<DevopsMsAppCU>{ 
        return new FieldUtil('ms_project_name','msProjectName','中台1.0对应项目名称', new DevopsMsAppCUImpl());
    }
    static get MS_PROJECT_ID(): FieldUtil<DevopsMsAppCU>{ 
        return new FieldUtil('ms_project_id','msProjectId','', new DevopsMsAppCUImpl());
    }
    static get MS_PROJECT_VERSION(): FieldUtil<DevopsMsAppCU>{ 
        return new FieldUtil('ms_project_version','msProjectVersion','', new DevopsMsAppCUImpl());
    }

    get ID(): FieldUtil<DevopsMsAppCU>{ 
        return DevopsMsAppMU.ID;
    }
    get APP_NAME(): FieldUtil<DevopsMsAppCU>{ 
        return DevopsMsAppMU.APP_NAME;
    }
    get MS_PROJECT_NAME(): FieldUtil<DevopsMsAppCU>{ 
        return DevopsMsAppMU.MS_PROJECT_NAME;
    }
    get MS_PROJECT_ID(): FieldUtil<DevopsMsAppCU>{ 
        return DevopsMsAppMU.MS_PROJECT_ID;
    }
    get MS_PROJECT_VERSION(): FieldUtil<DevopsMsAppCU>{ 
        return DevopsMsAppMU.MS_PROJECT_VERSION;
    }
}
export {DevopsMsAppMU, DevopsMsAppCU}
