model

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountColumns = struct {
	ID          string
	FirstName   string
	LastName    string
	Username    string
	Password    string
	Phone       string
	Email       string
	Enabled     string
	Gender      string
	CreatedTime string
	UpdatedTime string
}{
	ID:          "id",
	FirstName:   "first_name",
	LastName:    "last_name",
	Username:    "username",
	Password:    "password",
	Phone:       "phone",
	Email:       "email",
	Enabled:     "enabled",
	Gender:      "gender",
	CreatedTime: "created_time",
	UpdatedTime: "updated_time",
}

AccountColumns get sql column name.获取数据库列名

View Source
var CasbinRuleColumns = struct {
	ID    string
	Ptype string
	V0    string
	V1    string
	V2    string
	V3    string
	V4    string
	V5    string
}{
	ID:    "id",
	Ptype: "ptype",
	V0:    "v0",
	V1:    "v1",
	V2:    "v2",
	V3:    "v3",
	V4:    "v4",
	V5:    "v5",
}

CasbinRuleColumns get sql column name.获取数据库列名

View Source
var FlywaySchemaHistoryColumns = struct {
	InstalledRank string
	Version       string
	Description   string
	Type          string
	Script        string
	Checksum      string
	InstalledBy   string
	InstalledOn   string
	ExecutionTime string
	Success       string
}{
	InstalledRank: "installed_rank",
	Version:       "version",
	Description:   "description",
	Type:          "type",
	Script:        "script",
	Checksum:      "checksum",
	InstalledBy:   "installed_by",
	InstalledOn:   "installed_on",
	ExecutionTime: "execution_time",
	Success:       "success",
}

FlywaySchemaHistoryColumns get sql column name.获取数据库列名

Functions

This section is empty.

Types

type Account

type Account struct {
	ID          int       `gorm:"primaryKey;column:id;type:int;not null" json:"id"`
	FirstName   string    `gorm:"column:first_name;type:varchar(20);not null" json:"first_name"`
	LastName    string    `gorm:"column:last_name;type:varchar(20);not null" json:"last_name"`
	Username    string    `gorm:"unique;column:username;type:varchar(20);not null" json:"username"`
	Password    string    `gorm:"column:password;type:varchar(20);not null" json:"password"`
	Phone       string    `gorm:"column:phone;type:varchar(20)" json:"phone"`
	Email       string    `gorm:"column:email;type:varchar(30)" json:"email"`
	Enabled     bool      `gorm:"column:enabled;type:tinyint(1)" json:"enabled"`
	Gender      string    `gorm:"column:gender;type:varchar(10)" json:"gender"`
	CreatedTime time.Time `gorm:"column:created_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"created_time"`
	UpdatedTime time.Time `gorm:"column:updated_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"updated_time"`
}

Account [...]

func (*Account) TableName added in v1.4.1

func (m *Account) TableName() string

TableName get sql table name.获取数据库表名

type Base added in v1.3.7

type Base struct {
	ID          uint64    `gorm:"primaryKey;column:id"`
	CreatedTime time.Time `gorm:"column:created_time;type:timestamp;default:CURRENT_TIMESTAMP"`
	UpdatedTime time.Time `gorm:"column:updated_time;type:timestamp;default:CURRENT_TIMESTAMP"`
}

type CasbinRule added in v1.4.1

type CasbinRule struct {
	ID    uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null" json:"id"`
	Ptype string `gorm:"uniqueIndex:idx_casbin_rule;column:ptype;type:varchar(100)" json:"ptype"`
	V0    string `gorm:"uniqueIndex:idx_casbin_rule;column:v0;type:varchar(100)" json:"v0"`
	V1    string `gorm:"uniqueIndex:idx_casbin_rule;column:v1;type:varchar(100)" json:"v1"`
	V2    string `gorm:"uniqueIndex:idx_casbin_rule;column:v2;type:varchar(100)" json:"v2"`
	V3    string `gorm:"uniqueIndex:idx_casbin_rule;column:v3;type:varchar(100)" json:"v3"`
	V4    string `gorm:"uniqueIndex:idx_casbin_rule;column:v4;type:varchar(100)" json:"v4"`
	V5    string `gorm:"uniqueIndex:idx_casbin_rule;column:v5;type:varchar(100)" json:"v5"`
}

CasbinRule [...]

func (*CasbinRule) TableName added in v1.4.1

func (m *CasbinRule) TableName() string

TableName get sql table name.获取数据库表名

type FlywaySchemaHistory added in v1.4.1

type FlywaySchemaHistory struct {
	InstalledRank int       `gorm:"primaryKey;column:installed_rank;type:int;not null" json:"installed_rank"`
	Version       string    `gorm:"column:version;type:varchar(50)" json:"version"`
	Description   string    `gorm:"column:description;type:varchar(200);not null" json:"description"`
	Type          string    `gorm:"column:type;type:varchar(20);not null" json:"type"`
	Script        string    `gorm:"column:script;type:varchar(1000);not null" json:"script"`
	Checksum      string    `gorm:"column:checksum;type:varchar(50)" json:"checksum"`
	InstalledBy   string    `gorm:"column:installed_by;type:varchar(100);not null" json:"installed_by"`
	InstalledOn   time.Time `gorm:"column:installed_on;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"installed_on"`
	ExecutionTime int       `gorm:"column:execution_time;type:int;not null" json:"execution_time"`
	Success       bool      `gorm:"index:flyway_schema_history_s_idx;column:success;type:tinyint(1);not null" json:"success"`
}

FlywaySchemaHistory [...]

func (*FlywaySchemaHistory) TableName added in v1.4.1

func (m *FlywaySchemaHistory) TableName() string

TableName get sql table name.获取数据库表名

Jump to

Keyboard shortcuts

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