model

package
v0.0.0-...-55e1567 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID         int64  `gorm:"primarykey"`
	ToUserId   int64  `gorm:"not null"`
	FromUserId int64  `gorm:"not null"`
	Content    string `gorm:"type:varchar(256);not null"`
	CreateTime int64  `gorm:"not null"`
}

func (*Message) BeforeCreate

func (m *Message) BeforeCreate(_ *gorm.DB) (err error)

BeforeCreate uses snowflake to generate an ID.

Jump to

Keyboard shortcuts

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