model

package
v0.0.0-...-ad8f053 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

集合列表

用户集合
{
  "account": "账号",
  "email": "邮箱",
  "password": "密码",
  "nickname": "昵称",
  "sex": -1, // -1-未知 0-女 1-男
  "avatar": "头像",
  "created_at": "2024-03-20 00:00", // 创建时间
  "updated_at": "2024-03-20 00:00"  // 更新时间
}
消息集合
{
    "user_identity": "用户的唯一标识",
    "room_identity": "房间的唯一标识",
    "data": "发送的数据",
    "created_at": "2024-03-20 00:00", // 创建时间
    "updated_at": "2024-03-20 00:00"  // 更新时间
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	gorm.Model
	UId      uuid.UUID `gorm:"type:char(36);unique;comment:'id'" json:"UId"`
	Email    string    `gorm:"size:255;not null;unique;comment:'邮箱'" json:"email"`
	Password string    `gorm:"type:text;not null;comment:'密码'" json:"password"`
	Avatar   string    `gorm:"type:text;comment:'头像url'" json:"avatar"`
}

func (*Account) BeforeCreate

func (act *Account) BeforeCreate(*gorm.DB) (err error)

type FriendShip

type FriendShip struct {
	gorm.Model
	UserId   uuid.UUID `gorm:"type:char(36);comment:'user id'" json:"userId"`
	FriendId uuid.UUID `gorm:"type:char(36);comment:'friend id'" json:"friendId"`
	Status   byte      `gorm:"size:1;comment:'1:待确认,2:已确认,3:已删除'" json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL