model

package
v0.0.0-...-35d01cd Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	UID   string `gorm:"type:integer;not null;primary_key" json:"author_id"`
	Name  string `gorm:"type:varchar(255);not null;unique" json:"name"`
	Face  string `gorm:"type:text" json:"face"`
	BotID string `gorm:"type:integer;not null" json:"bot_id"`
}

type Bot

type Bot struct {
	UID     string `gorm:"type:integer;not null;primary_key" json:"bot_id"`
	Name    string `gorm:"type:varchar(255);not null" json:"name"`
	Face    string `gorm:"type:text" json:"face"`
	Cookie  string `gorm:"type:text;not null" json:"cookie"`
	IsLogin bool   `gorm:"type:boolean;not null" json:"is_login"`
	UserID  uint   `gorm:"type:integer;not null" json:"user_id"`
}

type Dynamic

type Dynamic struct {
	DynamicID string `gorm:"type:text;not null;primary_key" json:"dynamic_id"`
	PubTS     uint64 `gorm:"type:integer;not null" json:"ts"`
	Content   string `gorm:"type:text;not null" json:"content"`
	AuthorID  uint   `gorm:"type:integer;not null" json:"author_id"`
}

func ToDynamic

func ToDynamic(dynamic ...bilibot.Dynamic) (dynamics []Dynamic)

type Email

type Email struct {
	Host   string `gorm:"type:varchar(255)" json:"host"`
	Port   int    `gorm:"type:integer" json:"port"`
	From   string `gorm:"type:varchar(255)" json:"from"`
	To     string `gorm:"type:varchar(255)" json:"to"`
	Pass   string `gorm:"type:varchar(255)" json:"pass"`
	UserID uint   `gorm:"type:integer;not null" json:"user_id"`
}

type Task

type Task struct {
	Name      string `gorm:"primary_key" json:"id"`
	Spec      string `gorm:"type:varchar(255)" json:"spec"`
	Type      string `gorm:"type:varchar(255)" json:"type"`
	Attribute string `gorm:"type:varchar(255)" json:"attribute"`
	UserID    uint   `gorm:"type:integer;not null" json:"user_id"`
}

type User

type User struct {
	db.BaseModel
	Name     string `gorm:"type:varchar(255);not null;unique" json:"username" binding:"required"`
	Password string `gorm:"type:varchar(255);not null" json:"password" binding:"required"`
	Email    string `gorm:"type:varchar(255);" json:"email"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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