20 lines
374 B
Go
Raw Normal View History

2025-02-24 16:48:20 +08:00
package subscribeplanrepository
import (
subscribeplandomain "github.com/ardeman/project-legalgo-go/internal/domain/subscribe_plan"
"github.com/google/uuid"
)
func (s *SubsPlan) Create(code string) error {
spec := &subscribeplandomain.SubscribePlan{
ID: uuid.New(),
Code: code,
}
if err := s.DB.Create(&spec).Error; err != nil {
return err
}
return nil
}