Documentation ¶
Index ¶
- func CreateRedeemRepo(conn *gorm.DB) redeem.Repository
- func ToListDomain(data []Redeem) (result []redeem.Domain)
- type Redeem
- type RedeemRepo
- func (rep *RedeemRepo) Create(ctx context.Context, redR *redeem.Domain) (redeem.Domain, error)
- func (rep *RedeemRepo) Delete(ctx context.Context, id int) error
- func (rep *RedeemRepo) GetAll(ctx context.Context) ([]redeem.Domain, error)
- func (rep *RedeemRepo) GetById(ctx context.Context, id int) (redeem.Domain, error)
- func (rep *RedeemRepo) GetByItemId(ctx context.Context, id int) ([]redeem.Domain, error)
- func (rep *RedeemRepo) GetByUserId(ctx context.Context, id int) ([]redeem.Domain, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRedeemRepo ¶
func CreateRedeemRepo(conn *gorm.DB) redeem.Repository
func ToListDomain ¶
Types ¶
type Redeem ¶
type Redeem struct { Id int `gorm:"primaryKey"` UserId int ItemId int Item items.Items `gorm:"foreignKey:ItemId;association_foreignkey:Id"` DataRedeem string Point int Status int CreatedAt time.Time UpdatedAt time.Time }
func FromDomain ¶
type RedeemRepo ¶
func (*RedeemRepo) GetByItemId ¶
func (*RedeemRepo) GetByUserId ¶
Click to show internal directories.
Click to hide internal directories.