model

package
v0.0.0-...-d01447b Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

This section is empty.

Types

type Event

type Event struct {
	Event  string `json:"event"`
	Detail string // 事件详情
	// contains filtered or unexported fields
}

告警通知

type Link struct {
	URL          string `gorm:"unique"`
	Name         string `gorm:"unique"`
	IsVerified   bool
	IsSubscribed bool // 是否订阅
	// contains filtered or unexported fields
}

友链

type Post

type Post struct {
	Title  string `json:"title"`
	Tags   []Tag  `json:"tags" gorm:"many2many:post_tags;"`
	Author string `json:"author"`
	Origin string `json:"origin"` // 原始地址
	// contains filtered or unexported fields
}

图文内容

func (Post) TableName

func (p Post) TableName() string

type Profile

type Profile struct {
	Nickname  string    `gorm:"unique"` // 用户昵称
	Email     string    `gorm:"unique"`
	IsOwner   bool      // 是否超管
	IsActive  bool      // 是否有效
	AuthToken string    // 绑定口令
	ExpiredAt time.Time // 口令有效期,到期未绑定则作废
	// contains filtered or unexported fields
}

账户

type Tag

type Tag struct {
	Name string `json:"name" gorm:"unique"`
	// contains filtered or unexported fields
}

图文标签

func (Tag) TableName

func (t Tag) TableName() string

Jump to

Keyboard shortcuts

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