const system = require("../../../system");
const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings")
class SaasmerchanttitleService extends ServiceBase {
  constructor() {
    super("merchant", ServiceBase.getDaoName(SaasmerchanttitleService));
  }

  async byMerchantId(params) {
    let list = await this.dao.getAllByMerchantId(params.saas_merchant_id) || [];

    for (let row of list) {
      this.handleDate(row, ["created_at"], null, -8);
    }
    return system.getResultSuccess(list);
  }
}
module.exports = SaasmerchanttitleService;