user_poster.go 532 B

12345678910111213141516171819202122232425
  1. package model
  2. import (
  3. "context"
  4. "icloudapp.cn/tools/entity"
  5. "icloudapp.cn/tools/service"
  6. )
  7. type UserPoster struct {
  8. ctx context.Context
  9. }
  10. func NewUserPoster(ctx context.Context) *UserPoster {
  11. return &UserPoster{ctx: ctx}
  12. }
  13. func (p *UserPoster) Info(posterID int64) (entity.UserPosterInfo, error) {
  14. sPoster := service.NewPoster(p.ctx)
  15. return sPoster.InfoByID(posterID)
  16. }
  17. func (p *UserPoster) InfoByUUID(uuid int64) (entity.UserPosterInfo, error) {
  18. sPoster := service.NewPoster(p.ctx)
  19. return sPoster.InfoByUUID(uuid)
  20. }