2025-02-24 16:48:20 +08:00
|
|
|
package subscribesvc
|
|
|
|
|
|
2025-03-05 21:21:44 +08:00
|
|
|
import (
|
|
|
|
|
subscriberepository "legalgo-BE-go/internal/accessor/subscribe"
|
|
|
|
|
userdomain "legalgo-BE-go/internal/domain/user"
|
|
|
|
|
)
|
2025-02-24 16:48:20 +08:00
|
|
|
|
2025-03-05 21:21:44 +08:00
|
|
|
type impl struct {
|
2025-02-24 16:48:20 +08:00
|
|
|
subsRepo subscriberepository.SubsIntf
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-05 21:21:44 +08:00
|
|
|
type Subscribe interface {
|
2025-02-24 16:48:20 +08:00
|
|
|
Create(string) (string, error)
|
2025-03-05 21:21:44 +08:00
|
|
|
Update(string, userdomain.UserSubsUpdate) error
|
2025-02-24 16:48:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-03-05 21:21:44 +08:00
|
|
|
func New(subsRepo subscriberepository.SubsIntf) Subscribe {
|
|
|
|
|
return &impl{subsRepo}
|
2025-02-24 16:48:20 +08:00
|
|
|
}
|