feat: add invitation and promotion functions

This commit is contained in:
RockYang
2023-11-23 16:30:15 +08:00
parent d35164506a
commit a4a1eec30b
17 changed files with 627 additions and 70 deletions

View File

@@ -0,0 +1,12 @@
package model
import "time"
type InviteCode struct {
Id uint `gorm:"primarykey;column:id"`
UserId uint
Code string
Hits int // 点击次数
RegNum int // 注册人数
CreatedAt time.Time
}

View File

@@ -0,0 +1,15 @@
package model
import (
"time"
)
type InviteLog struct {
Id uint `gorm:"primarykey;column:id"`
InviterId uint
UserId uint
Username string
InviteCode string
Reward string `gorm:"column:reward_json"` // 邀请奖励
CreatedAt time.Time
}