Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PointHistory ¶
type PointHistory struct { gorm.Model EntityID uuid.UUID `gorm:"not null"` AmountModified int64 `gorm:"not null;default:0"` ModifyReason string CompletedQuest *Quest }
PointHistory entity for quest transaction
func (*PointHistory) MarshalBinary ¶
func (p *PointHistory) MarshalBinary() ([]byte, error)
MarshalBinary for redis
func (*PointHistory) ToDTO ¶
func (p *PointHistory) ToDTO() (*module.PointHistoryDTO, error)
ToDTO dto
func (*PointHistory) UnmarshalBinary ¶
func (p *PointHistory) UnmarshalBinary(data []byte) error
UnmarshalBinary for redis
type Points ¶
type Points struct { entity.Base EntityID uuid.UUID `gorm:"not null;primary_key;unique_index"` TotalPoints int64 `gorm:"not null;default:0"` History []*PointHistory }
Points entity for point balance for entity
func (*Points) MarshalBinary ¶
MarshalBinary for redis
func (*Points) UnmarshalBinary ¶
UnmarshalBinary for redis
type Quest ¶
type Quest struct { entity.Base //EntityID service ID EntityID uuid.UUID `gorm:"not null"` //BusinessID only set when IsBusinessSpecific is true BusinessID uuid.UUID //UserID only set when IsUserSpecific is true UserID uuid.UUID Type int32 `gorm:"not null"` Threshold float32 //RewardPoints points to reward once completed RewardPoints uint64 `gorm:"not null;default:0"` Description string BannerImageURL string //AmountOfCompletionPerDay -1 means unlimited AmountOfCompletionPerDay uint32 `gorm:"not null;default:1"` ActiveFrom time.Time ActiveTo time.Time IsActive bool `gorm:"not null;default:false"` IsBusinessQuest bool `gorm:"not null;default:false"` IsBusinessSpecific bool `gorm:"not null;default:false"` IsUserSpecific bool `gorm:"not null;default:false"` IsOncePerEntity bool `gorm:"not null;default:false"` }
Quest entity
func (*Quest) MarshalBinary ¶
MarshalBinary for redis
func (*Quest) UnmarshalBinary ¶
UnmarshalBinary for redis
type QuestProgress ¶
type QuestProgress struct { entity.Base EntityID uuid.UUID `gorm:"not null"` CurrentProgress float32 `gorm:"not null;default:0"` IsCancelled bool `gorm:"not null;default:false"` IsCompleted bool `gorm:"not null;default:false"` AcceptedQuest *Quest `gorm:"not null"` }
QuestProgress entity
func (*QuestProgress) MarshalBinary ¶
func (q *QuestProgress) MarshalBinary() ([]byte, error)
MarshalBinary for redis
func (*QuestProgress) ToDTO ¶
func (q *QuestProgress) ToDTO() (*module.QuestProgressDTO, error)
ToDTO dto
func (*QuestProgress) UnmarshalBinary ¶
func (q *QuestProgress) UnmarshalBinary(data []byte) error
UnmarshalBinary for redis
Click to show internal directories.
Click to hide internal directories.