2025-02-24 16:48:20 +08:00
|
|
|
package subscribeplanrepository
|
|
|
|
|
|
2025-02-24 20:18:09 +08:00
|
|
|
import (
|
2025-02-27 07:25:25 +08:00
|
|
|
"legalgo-BE-go/database"
|
|
|
|
|
subscribeplandomain "legalgo-BE-go/internal/domain/subscribe_plan"
|
2025-02-24 20:18:09 +08:00
|
|
|
)
|
2025-02-24 16:48:20 +08:00
|
|
|
|
|
|
|
|
type SubsPlan struct {
|
|
|
|
|
DB *database.DB
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SubsPlanIntf interface {
|
2025-02-24 20:18:09 +08:00
|
|
|
Create(subscribeplandomain.SubscribePlanReq) error
|
|
|
|
|
GetAll() ([]subscribeplandomain.SubscribePlan, error)
|
2025-03-05 21:21:44 +08:00
|
|
|
GetByID(string) (*database.SubscribePlan, error)
|
|
|
|
|
GetDefault() (*database.SubscribePlan, error)
|
2025-02-24 16:48:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func New(
|
|
|
|
|
db *database.DB,
|
|
|
|
|
) SubsPlanIntf {
|
|
|
|
|
return &SubsPlan{db}
|
|
|
|
|
}
|