models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAccount = "account"
View Source
const TableNameFile = "file"
View Source
const TableNameTemplate = "template"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID        int64  `gorm:"column:id;type:bigint;primaryKey" json:"id"`
	Mobile    string `gorm:"column:mobile;type:varchar(20);not null;index:account_mobile_idx,priority:1" json:"mobile"`
	Email     string `gorm:"column:email;type:varchar(100);not null;index:account_email_idx,priority:1" json:"email"`
	Password  string `gorm:"column:password;type:varchar(64);not null" json:"password"`
	Salt      string `gorm:"column:salt;type:varchar(64);not null" json:"salt"`
	IsDeleted bool   `gorm:"column:is_deleted;type:tinyint(1);not null" json:"is_deleted"`
}

Account mapped from table <account>

func (*Account) TableName

func (*Account) TableName() string

TableName Account's table name

type File

type File struct {
	ID         int64     `gorm:"column:id;type:bigint;primaryKey" json:"id"`
	DomainName string    `gorm:"column:domain_name;type:varchar(100);not null" json:"domain_name"`
	BizName    string    `gorm:"column:biz_name;type:varchar(100);not null" json:"biz_name"`
	Hash       string    `gorm:"column:hash;type:varchar(255);not null;index:hash_idx,priority:1" json:"hash"`
	FileSize   int64     `gorm:"column:file_size;type:bigint;not null" json:"file_size"`
	FileType   string    `gorm:"column:file_type;type:varchar(255);not null" json:"file_type"`
	Uploaded   bool      `gorm:"column:uploaded;type:tinyint(1);not null" json:"uploaded"`
	IsDeleted  bool      `gorm:"column:is_deleted;type:tinyint(1);not null" json:"is_deleted"`
	CreateTime time.Time `` /* 127-byte string literal not displayed */
	UpdateTime time.Time `` /* 127-byte string literal not displayed */
}

File mapped from table <file>

func (*File) TableName

func (*File) TableName() string

TableName File's table name

type Template

type Template struct {
	ID         int64     `gorm:"column:id;type:bigint;primaryKey" json:"id"`
	Title      string    `gorm:"column:title;type:varchar(255);not null;index:title_idx,priority:1" json:"title"`
	Content    string    `gorm:"column:content;type:text;not null" json:"content"`
	IsDeleted  bool      `gorm:"column:is_deleted;type:tinyint(1);not null" json:"is_deleted"`
	CreateTime time.Time `` /* 127-byte string literal not displayed */
	UpdateTime time.Time `` /* 127-byte string literal not displayed */
}

Template mapped from table <template>

func (*Template) TableName

func (*Template) TableName() string

TableName Template's table name

Jump to

Keyboard shortcuts

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