const system = require("../../../system");
const ServiceBase = require("../../svems.base")

class ProductService extends ServiceBase {
  constructor() {
    super();
  }

  async getPage (params) {
    try {
      return await this.callms("engine_product", "getPage", params)
    } catch (error) {
      throw error
    }
  }

  async getAllDic (params) {
    try {
      return await this.callms("engine_product", "getAllDic", params)
    } catch (error) {
      throw error
    }
  }

  async getByIds (params) {
    try {
      return await this.callms("engine_product", "getByIds", params)
    } catch (error) {
      throw error
    }
  }

  async getItems (params) {
    try {
      return await this.callms("engine_product", "getItems", params)
    } catch (error) {
      throw error
    }
  }

  async createOrUpdate (params) {
    try {
      return await this.callms("engine_product", "createOrUpdate", params)
    } catch (error) {
      throw error
    }
  }
}

module.exports = ProductService;