package merchant

import (
	"context"
	"kami/internal/dao"
	"kami/internal/model/entity"
	"kami/utility/config"
)

func (s *sMerchant) All(ctx context.Context) (list []*entity.V1MerchantInfo, total int, err error) {
	list = make([]*entity.V1MerchantInfo, 0)
	total = 0
	m := dao.V1MerchantInfo.Ctx(ctx).DB(config.GetDatabaseV1())
	err = m.ScanAndCount(&list, &total, false)
	return
}
