package repo

import (
	"yuleduiPay/service/po"

	"github.com/gogf/gf/v2/frame/g"
)

type Shop struct {
}

func (t *Shop) GetShopById(shopId string) (*po.Shop, error) {
	shop := &po.Shop{}
	err := g.Model("shop").Where("shop_id = ?", shopId).Scan(shop)
	return shop, err
}

func (t *Shop) GetShopAdminByShopId(shopId string) (*po.ShopAdmin, error) {
	shopAdmin := &po.ShopAdmin{}
	err := g.Model("shop_admin").Where("shop_id = ?", shopId).Scan(shopAdmin)
	return shopAdmin, err
}