Documentation ¶
Index ¶
- type PromotionRepositoryPostgres
- type UserRepositoryPostgres
- func (r *UserRepositoryPostgres) Create(user *entity.User) error
- func (r *UserRepositoryPostgres) DeleteByID(id uint) error
- func (r *UserRepositoryPostgres) FindAll() ([]*entity.User, error)
- func (r *UserRepositoryPostgres) GetByID(id uint) (*entity.User, error)
- func (r *UserRepositoryPostgres) Update(user *entity.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromotionRepositoryPostgres ¶
func NewPromotionRepositoryPostgres ¶
func NewPromotionRepositoryPostgres(db *gorm.DB) *PromotionRepositoryPostgres
func (*PromotionRepositoryPostgres) ApplyPromotion ¶
func (r *PromotionRepositoryPostgres) ApplyPromotion(promoID uint, userIDs []int) error
func (*PromotionRepositoryPostgres) GetAppliedUsers ¶
func (r *PromotionRepositoryPostgres) GetAppliedUsers(promoID uint) ([]int, error)
func (*PromotionRepositoryPostgres) GetAvailableUsers ¶
func (r *PromotionRepositoryPostgres) GetAvailableUsers(promoType int) ([]int, error)
type UserRepositoryPostgres ¶
func NewUserRepositoryPostgres ¶
func NewUserRepositoryPostgres(db *gorm.DB) *UserRepositoryPostgres
func (*UserRepositoryPostgres) Create ¶
func (r *UserRepositoryPostgres) Create(user *entity.User) error
func (*UserRepositoryPostgres) DeleteByID ¶
func (r *UserRepositoryPostgres) DeleteByID(id uint) error
func (*UserRepositoryPostgres) FindAll ¶
func (r *UserRepositoryPostgres) FindAll() ([]*entity.User, error)
Click to show internal directories.
Click to hide internal directories.