import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CnProjectContext } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-03 10:21
 */
interface CnProjectContextCU extends ConditionUtil<CnProjectContextCU>{
    ID:FieldUtil<CnProjectContextCU>;
    PROJECT_ID:FieldUtil<CnProjectContextCU>;
    GATEWAY:FieldUtil<CnProjectContextCU>;
    URI:FieldUtil<CnProjectContextCU>;
    DELETED:FieldUtil<CnProjectContextCU>;
    CREATE_USER_ID:FieldUtil<CnProjectContextCU>;
    CREATE_TIME:FieldUtil<CnProjectContextCU>;
    ENV_ID:FieldUtil<CnProjectContextCU>;
    ENV_CODE:FieldUtil<CnProjectContextCU>;
}

class CnProjectContextCUImpl extends ConditionUtilImpl<CnProjectContextCUImpl> implements CnProjectContextCU{ 
    newInstance(): CnProjectContextCUImpl {
        return new CnProjectContextCUImpl();
    } 
    get ID(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get PROJECT_ID(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('project_id','projectId','项目主键', this);
    }
    get GATEWAY(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('gateway','gateway','网关', this);
    }
    get URI(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('uri','uri','URI', this);
    }
    get DELETED(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('deleted','deleted','删除标记', this);
    }
    get CREATE_USER_ID(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('create_user_id','createUserId','创建人', this);
    }
    get CREATE_TIME(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get ENV_ID(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('env_id','envId','环境ID', this);
    }
    get ENV_CODE(): FieldUtil<CnProjectContextCU>{  
        return new FieldUtil('env_code','envCode','TEST/PROD...', this);
    }
}

@Singleton 
class CnProjectContextMU extends TableUtilImpl<CnProjectContextCU,CnProjectContext>{ 
    tableName  = 'cn_project_context';
    tableFields  = ['id','project_id','gateway','uri','deleted','create_user_id','create_time','env_id','env_code'];
    modelFields  = ['id','projectId','gateway','uri','deleted','createUserId','createTime','envId','envCode'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CnProjectContextCU {
        return new CnProjectContextCUImpl();
    }   

    static get ID(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('id','id','主键', new CnProjectContextCUImpl());
    }
    static get PROJECT_ID(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('project_id','projectId','项目主键', new CnProjectContextCUImpl());
    }
    static get GATEWAY(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('gateway','gateway','网关', new CnProjectContextCUImpl());
    }
    static get URI(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('uri','uri','URI', new CnProjectContextCUImpl());
    }
    static get DELETED(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('deleted','deleted','删除标记', new CnProjectContextCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('create_user_id','createUserId','创建人', new CnProjectContextCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new CnProjectContextCUImpl());
    }
    static get ENV_ID(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('env_id','envId','环境ID', new CnProjectContextCUImpl());
    }
    static get ENV_CODE(): FieldUtil<CnProjectContextCU>{ 
        return new FieldUtil('env_code','envCode','TEST/PROD...', new CnProjectContextCUImpl());
    }

    get ID(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.ID;
    }
    get PROJECT_ID(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.PROJECT_ID;
    }
    get GATEWAY(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.GATEWAY;
    }
    get URI(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.URI;
    }
    get DELETED(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.DELETED;
    }
    get CREATE_USER_ID(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.CREATE_USER_ID;
    }
    get CREATE_TIME(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.CREATE_TIME;
    }
    get ENV_ID(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.ENV_ID;
    }
    get ENV_CODE(): FieldUtil<CnProjectContextCU>{ 
        return CnProjectContextMU.ENV_CODE;
    }
}
export {CnProjectContextMU, CnProjectContextCU}
