db

package
v0.0.0-...-8f419a9 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        uint64    "gorm:column:id;primaryKey;autoIncrement;not null"
	CreatedAt time.Time `gorm:"column:created_at;index:created_at;not null;default:CURRENT_TIMESTAMP"`
	UpdatedAt time.Time `gorm:"column:updated_at;index:updated_at;not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
}

func (BaseModel) CreatedAtDate

func (model BaseModel) CreatedAtDate() string

CreatedAtDate 获取模型创建时间

func (BaseModel) GetStringID

func (model BaseModel) GetStringID() string

GetStringID 主键转字符串

func (BaseModel) UpdatedAtDate

func (model BaseModel) UpdatedAtDate() string

UpdatedAtDate 获取模型更新时间

Jump to

Keyboard shortcuts

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