import { Http,Util } from '@/utils';
import EntityService from '../entity-service';



/**
 * 实体数据操作标识服务对象基类
 *
 * @export
 * @class SYS_PSDEOPPRIVServiceBase
 * @extends {EntityServie}
 */
export default class SYS_PSDEOPPRIVServiceBase extends EntityService {

    /**
     * Creates an instance of  SYS_PSDEOPPRIVServiceBase.
     * 
     * @param {*} [opts={}]
     * @memberof  SYS_PSDEOPPRIVServiceBase
     */
    constructor(opts: any = {}) {
        super(opts);
    }

    /**
     * 初始化基础数据
     *
     * @memberof SYS_PSDEOPPRIVServiceBase
     */
    public initBasicData(){
        this.APPLYDEKEY ='sys_psdeoppriv';
        this.APPDEKEY = 'psdeopprivid';
        this.APPDENAME = 'sys_psdeopprivs';
        this.APPDETEXT = 'psdeopprivname';
    }

// 实体接口

    /**
     * Select接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof SYS_PSDEOPPRIVServiceBase
     */
    public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
            return Http.getInstance().get(`/sys_psdeopprivs/${context.sys_psdeoppriv}/select`,isloading);
    }

    /**
     * FetchDefault接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof SYS_PSDEOPPRIVServiceBase
     */
    public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        let tempData:any = JSON.parse(JSON.stringify(data));
        return Http.getInstance().get(`/sys_psdeopprivs/select`,tempData,isloading);
    }
}