model

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameCasbinRule = "casbin_rule"
View Source
const TableNameUser = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type CasbinRule

type CasbinRule struct {
	ID    int64  `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"`
	Ptype string `gorm:"column:ptype;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:1" json:"ptype"`
	V0    string `gorm:"column:v0;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:2" json:"v0"`
	V1    string `gorm:"column:v1;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:3" json:"v1"`
	V2    string `gorm:"column:v2;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:4" json:"v2"`
	V3    string `gorm:"column:v3;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:5" json:"v3"`
	V4    string `gorm:"column:v4;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:6" json:"v4"`
	V5    string `gorm:"column:v5;type:varchar(100);uniqueIndex:idx_casbin_rule,priority:7" json:"v5"`
}

CasbinRule mapped from table <casbin_rule>

func (*CasbinRule) TableName

func (*CasbinRule) TableName() string

TableName CasbinRule's table name

type User

type User struct {
	ID        int64     `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"`
	Username  string    `gorm:"column:username;type:varchar(50);index:username_idx,priority:1" json:"username"`
	Email     string    `gorm:"column:email;type:varchar(100);index:email_idx,priority:1" json:"email"`
	Mobile    string    `gorm:"column:mobile;type:varchar(20)" json:"mobile"`
	Password  string    `gorm:"column:password;type:char(60)" json:"password"`
	Gender    int32     `gorm:"column:gender;type:tinyint" json:"gender"`
	Age       int32     `gorm:"column:age;type:tinyint unsigned" json:"age"`
	Status    int32     `gorm:"column:status;type:tinyint;default:1" json:"status"`
	CreatedAt time.Time `gorm:"column:created_at;type:datetime;index:created_at_idx,priority:1;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;default:CURRENT_TIMESTAMP" json:"updated_at"`
	LastLogin time.Time `gorm:"column:last_login;type:datetime" json:"last_login"`
	Bio       string    `gorm:"column:bio;type:text" json:"bio"`
}

User mapped from table <users>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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