common

package
v0.0.0-...-28af436 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	// 在添加数据需要的定义
	// 数据库里面这个对象到时候也会返回给对象拿到(通过界面api),所以它也是需要反序列化的
	Id int64 `json:"id"`

	// 创建时间
	// 使用时间戳来创建用户的时间,根据自己的时区转换
	CreatedAt int64 `json:"created_at"`

	// 更新时间
	UpdatedAt int64 `json:"updated_at"`
}

func NewMeta

func NewMeta() *Meta

type Scope

type Scope struct {
	Username string `json:"Username"`
}

控制用户访问数据的访问 操作数据的时候,加上一个where条件 比如用户A10,要去编辑用户B(12)的文章, id=10 and create_by = 10

Jump to

Keyboard shortcuts

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