const system=require("../../system");
const Dao=require("../dao.base");
class BMmerchantcompanyDao extends Dao{
  constructor(){
    super(Dao.getModelName(BMmerchantcompanyDao));
  }

  async findByMerchantId(merchantId) {
    var sql = [];
    sql.push("SELECT");
    sql.push("`id`, `merchantId`, `name`, `regname`, `created_at`, `updated_at`");
    sql.push("FROM");
    sql.push("`bm_merchant_company` ");
    sql.push("WHERE merchantId = :merchantId");

    var list = await this.customQuery(sql.join(" "), {
      merchantId: merchantId,
    });

    return list;
  }
}
module.exports=BMmerchantcompanyDao;
