17 lines
604 B
Go
17 lines
604 B
Go
package system
|
||
|
||
import "time"
|
||
|
||
// UserInviteRelation 邀请关系(inviter -> invitee)
|
||
type UserInviteRelation struct {
|
||
ID uint `json:"id" gorm:"primaryKey"`
|
||
InviterUserID uint `json:"inviterUserId" gorm:"index;not null;comment:邀请人用户ID"`
|
||
InviteeUserID uint `json:"inviteeUserId" gorm:"uniqueIndex;not null;comment:被邀请人用户ID(唯一)"`
|
||
InviteCodeID uint `json:"inviteCodeId" gorm:"index;not null;comment:邀请码ID"`
|
||
CreatedAt time.Time `json:"createdAt"`
|
||
}
|
||
|
||
func (UserInviteRelation) TableName() string {
|
||
return "user_invite_relations"
|
||
}
|