import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CloudAccount } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-03-25 16:54
 */
interface CloudAccountCU extends ConditionUtil<CloudAccountCU>{
    ID:FieldUtil<CloudAccountCU>;
    ACCESS_KEY:FieldUtil<CloudAccountCU>;
    SECRET:FieldUtil<CloudAccountCU>;
    PROJECT_ID:FieldUtil<CloudAccountCU>;
    CLOUD_PLATFORM:FieldUtil<CloudAccountCU>;
}

class CloudAccountCUImpl extends ConditionUtilImpl<CloudAccountCUImpl> implements CloudAccountCU{ 
    newInstance(): CloudAccountCUImpl {
        return new CloudAccountCUImpl();
    } 
    get ID(): FieldUtil<CloudAccountCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get ACCESS_KEY(): FieldUtil<CloudAccountCU>{  
        return new FieldUtil('ACCESS_KEY','accessKey','', this);
    }
    get SECRET(): FieldUtil<CloudAccountCU>{  
        return new FieldUtil('SECRET','secret','', this);
    }
    get PROJECT_ID(): FieldUtil<CloudAccountCU>{  
        return new FieldUtil('PROJECT_ID','projectId','', this);
    }
    get CLOUD_PLATFORM(): FieldUtil<CloudAccountCU>{  
        return new FieldUtil('CLOUD_PLATFORM','cloudPlatform','所属平台（1-阿里云；2-华为云；）', this);
    }
}

@Singleton 
class CloudAccountMU extends TableUtilImpl<CloudAccountCU,CloudAccount>{ 
    tableName  = 'cloud_account';
    tableFields  = ['id','access_key','secret','project_id','cloud_platform'];
    modelFields  = ['id','accessKey','secret','projectId','cloudPlatform'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CloudAccountCU {
        return new CloudAccountCUImpl();
    }   

    static get ID(): FieldUtil<CloudAccountCU>{ 
        return new FieldUtil('ID','id','主键', new CloudAccountCUImpl());
    }
    static get ACCESS_KEY(): FieldUtil<CloudAccountCU>{ 
        return new FieldUtil('ACCESS_KEY','accessKey','', new CloudAccountCUImpl());
    }
    static get SECRET(): FieldUtil<CloudAccountCU>{ 
        return new FieldUtil('SECRET','secret','', new CloudAccountCUImpl());
    }
    static get PROJECT_ID(): FieldUtil<CloudAccountCU>{ 
        return new FieldUtil('PROJECT_ID','projectId','', new CloudAccountCUImpl());
    }
    static get CLOUD_PLATFORM(): FieldUtil<CloudAccountCU>{ 
        return new FieldUtil('CLOUD_PLATFORM','cloudPlatform','所属平台（1-阿里云；2-华为云；）', new CloudAccountCUImpl());
    }

    get ID(): FieldUtil<CloudAccountCU>{ 
        return CloudAccountMU.ID;
    }
    get ACCESS_KEY(): FieldUtil<CloudAccountCU>{ 
        return CloudAccountMU.ACCESS_KEY;
    }
    get SECRET(): FieldUtil<CloudAccountCU>{ 
        return CloudAccountMU.SECRET;
    }
    get PROJECT_ID(): FieldUtil<CloudAccountCU>{ 
        return CloudAccountMU.PROJECT_ID;
    }
    get CLOUD_PLATFORM(): FieldUtil<CloudAccountCU>{ 
        return CloudAccountMU.CLOUD_PLATFORM;
    }
}
export {CloudAccountMU, CloudAccountCU}
