model

package
v1.1.97 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	Id        string    `gorm:"type:varchar(32);not null;uniqueIndex;comment:ID" json:"id" pb:"req:urd;res:crl"`
	Level     string    `gorm:"column:level;type:varchar(10);comment:等级" json:"level" pb:"req:curl;res:crl"`
	Msg       string    `gorm:"column:msg;type:varchar(2000);index;comment:msg" json:"msg" pb:"req:curl;res:crl"`
	Content   string    `gorm:"column:content;type:text;comment:内容" json:"content" pb:"req:curl;res:crl"`
	Uid       string    `gorm:"type:varchar(32);not null;index;comment:uid" json:"uid" pb:"req:curl;res:crl"`
	RequestId string    `gorm:"type:varchar(32);not null;index;comment:request_id" json:"request_id" pb:"req:curl;res:crl"`
	ClientIp  string    `gorm:"type:varchar(32);not null;index;comment:client_ip" json:"client_ip" pb:"req:curl;res:crl"`
	Stack     string    `gorm:"column:stack;type:text;comment:stack" json:"stack" pb:"req:curl;res:crl"`
	Sql       string    `gorm:"column:sql;type:text;comment:sql" json:"sql" pb:"req:curl;res:crl"`
	CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at" pb:"res:crl"`
}

Log 日志

func (*Log) BeforeCreate added in v1.1.94

func (log *Log) BeforeCreate(db *gorm.DB) error

BeforeCreate 创建前

func (*Log) Create

func (log *Log) Create(ctx context.Context) (*Log, error)

Create 创建

func (*Log) TableName

func (*Log) TableName() string

TableName 表名

Jump to

Keyboard shortcuts

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