model

package
v0.0.0-...-48d44df Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameChat = "chat"

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	ID         int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 主键ID
	FromUserID int64          `gorm:"column:from_user_id" json:"from_user_id"`           // 发送消息用户ID
	ToUserID   int64          `gorm:"column:to_user_id" json:"to_user_id"`               // 接收消息用户ID
	Content    string         `gorm:"column:content" json:"content"`                     // 消息内容
	CreatedAt  time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt  time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

Chat mapped from table <chat>

func (*Chat) TableName

func (*Chat) TableName() string

TableName Chat's table name

Jump to

Keyboard shortcuts

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