(ctx context.Context, inp CreatePromoCodeInput)
| 18 | } |
| 19 | |
| 20 | func (s *PromoCodeService) Create(ctx context.Context, inp CreatePromoCodeInput) (primitive.ObjectID, error) { |
| 21 | return s.repo.Create(ctx, domain.PromoCode{ |
| 22 | SchoolID: inp.SchoolID, |
| 23 | Code: inp.Code, |
| 24 | DiscountPercentage: inp.DiscountPercentage, |
| 25 | ExpiresAt: inp.ExpiresAt, |
| 26 | OfferIDs: inp.OfferIDs, |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | func (s *PromoCodeService) Update(ctx context.Context, inp domain.UpdatePromoCodeInput) error { |
| 31 | return s.repo.Update(ctx, inp) |