21 lines
648 B
Go
21 lines
648 B
Go
package model
|
|
|
|
// User 用户模型
|
|
type Invite struct {
|
|
Model
|
|
UserId int32 `gorm:"column:user_id;default:0;comment:邀请人账号id"`
|
|
InvitedId int32 `gorm:"column:invited_id;default:0;comment:受邀请人账号id"`
|
|
InviteCode string `gorm:"column:invite_code;comment:邀请人的邀请码"`
|
|
InvitedCode string `gorm:"column:invited_code;comment:受邀请人的邀请码"`
|
|
}
|
|
|
|
type InvitedCodeService struct {
|
|
InvitedCode string `form:"invitedCode" json:"invitedCode"`
|
|
}
|
|
|
|
type InviteService struct {
|
|
Id int32 `json:"id"`
|
|
UserId int32 `form:"userId" json:"userId"`
|
|
InvitedId int32 `form:"invitedId" json:"invitedId"`
|
|
}
|