table

package
v0.0.0-...-b2e924d Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 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 Page

type Page struct {
	ID         int           `xorm:"pid not null pk autoincr INT(20)"`
	Poster     string        `xorm:"poster not null comment('Poster') VARCHAR(64)"`
	Syntax     string        `xorm:"syntax not null comment('Syntax') VARCHAR(64)"`
	Content    string        `xorm:"content not null comment('Content') TEXT(65535)"`
	TinyURL    string        `xorm:"tinyurl not null comment('TinyURL') VARCHAR(64)"`
	Expiration time.Duration `xorm:"expir not null comment('Expiration') BIGINT(30)"`

	CreatedAt time.Time `xorm:"ctime not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP created"`
	UpdatedAt time.Time `xorm:"utime not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP updated"`
	Version   int       `xorm:"version"`
}

Page the page table

func (*Page) TableName

func (t *Page) TableName() string

TableName return the table name

type User

type User struct {
	UID        int                `xorm:"user_uid not null pk autoincr INT(20)"`
	UIN        string             `xorm:"id not null comment('用户ID名') unique VARCHAR(64)"`
	Pwd        string             `xorm:"pwd not null comment('密码') VARCHAR(128)"`
	Salt       string             `xorm:"salt not null comment('盐值') VARCHAR(128)"`
	Role       string             `xorm:"role comment('角色') VARCHAR(128)"`
	Desc       string             `xorm:"desc comment('描述') VARCHAR(128)"`
	Permission UserPermissionType `xorm:"account_type not null comment('账户类型 123...') TINYINT(4)"`

	CreatedAt time.Time `xorm:"ctime not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP created"`
	UpdatedAt time.Time `xorm:"utime not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP updated"`
	Version   int       `xorm:"version"`
}

User the user table

func (*User) TableName

func (t *User) TableName() string

TableName return the table name

type UserPermissionType

type UserPermissionType int

UserPermissionType bit

Jump to

Keyboard shortcuts

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