model

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeText     = "text"
	MessageTypeAt       = "at"
	MessageTypeAudio    = "audio"
	MessageTypeImage    = "image"
	MessageTypeFile     = "file"
	MessageTypeLocation = "location"
	MessageTypeVideo    = "video"
	MessageTypeLink     = "link"
	MessageTypeContact  = "contact"
	MessageTypeGroup    = "group"
	MessageTypeRich     = "rich"
	MessageTypeAction   = "action"
)
View Source
const (
	PlatformSlack    = "slack"
	PlatformTelegram = "telegram"
	PlatformDiscord  = "discord"
)
View Source
const (
	StrengthAttr    RoleAttr = "strength"
	CultureAttr     RoleAttr = "culture"
	EnvironmentAttr RoleAttr = "environment"
	CharismaAttr    RoleAttr = "charisma"
	TalentAttr      RoleAttr = "talent"
	IntellectAttr   RoleAttr = "intellect"

	StrengthShort    AttrShort = "str"
	CultureShort     AttrShort = "cul"
	EnvironmentShort AttrShort = "env"
	CharismaShort    AttrShort = "cha"
	TalentShort      AttrShort = "tal"
	IntellectShort   AttrShort = "int"
)
View Source
const SuperUserID = 1
View Source
const TodoCompletedExp = 2
View Source
const TodoCreatedExp = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v0.0.24

type Account struct {
	ID      int       `db:"id"`
	Name    string    `db:"name"`
	Balance float64   `db:"balance"`
	Time    time.Time `db:"time"`
}

type App added in v0.0.9

type App struct {
	ID    int       `db:"id"`
	Name  string    `db:"name"`
	Type  string    `db:"type"`
	Token string    `db:"token"`
	Extra string    `db:"extra"`
	Time  time.Time `db:"time"`
}

type Assets added in v0.0.24

type Assets struct {
	ID        int       `db:"id"`
	AccountID int       `db:"account_id"` // -> account
	Name      string    `db:"name"`
	Category  string    `db:"category"`
	Balance   float64   `db:"balance"`
	Time      time.Time `db:"time"`
}

type AttrChange added in v0.0.24

type AttrChange struct {
	UserID  int    `json:"user_id"`
	Content string `json:"content"`
}

type AttrShort added in v0.0.24

type AttrShort string

type Bill added in v0.0.24

type Bill struct {
	ID          int       `db:"id"`
	Date        string    `db:"date"`
	Payee       string    `db:"payee"`
	Description string    `db:"description"`
	Amount      float64   `db:"amount"`
	Time        time.Time `db:"time"`
}

type BillRecord added in v0.0.24

type BillRecord struct {
	ID      int     `db:"id"`
	BillID  int     `db:"bill_id"`
	Posting string  `db:"posting"` // -> assets
	Amount  float64 `db:"amount"`
}

type Credential added in v0.0.9

type Credential struct {
	ID      int       `db:"id"`
	Name    string    `db:"name"`
	Type    string    `db:"type"`
	Content string    `db:"content"`
	Time    time.Time `db:"time"`
}

type Equipment added in v0.0.24

type Equipment struct {
	ID       int       `db:"id"`
	Name     string    `db:"name"`
	Quality  string    `db:"quality"`
	Level    int       `db:"level"`
	Category string    `db:"category"`
	Time     time.Time `db:"time"`
}

type Message

type Message struct {
	ID   int       `db:"id"`
	UUID string    `db:"uuid"`
	Type string    `db:"type"`
	Text string    `db:"text"`
	Time time.Time `db:"time"`
}

func (*Message) IsMessageOfAction added in v0.0.24

func (m *Message) IsMessageOfAction() bool

func (*Message) RemoveActionFlag added in v0.0.24

func (m *Message) RemoveActionFlag() string

type Page

type Page struct {
	ID      int       `db:"id"`
	UUID    string    `db:"uuid"`
	Type    string    `db:"type"`
	Title   string    `db:"title"`
	Content string    `db:"content"`
	Time    time.Time `db:"time"`
}

type Quest added in v0.0.24

type Quest struct {
	ID            int       `db:"id"`
	Title         string    `db:"title"`
	Exp           int       `db:"exp"`
	AttrPoints    string    `db:"attr_points"`
	Preconditions string    `db:"preconditions"`
	Time          time.Time `db:"time"`
}

type Role added in v0.0.24

type Role struct {
	ID         int    `db:"id"`
	UserID     int    `db:"user_id"`
	Profession string `db:"profession"`

	Exp   int `db:"exp"`
	Level int `db:"level"`

	// attr
	Strength    int `db:"strength"`
	Culture     int `db:"culture"`
	Environment int `db:"environment"`
	Charisma    int `db:"charisma"`
	Talent      int `db:"talent"`
	Intellect   int `db:"intellect"`

	Time time.Time `db:"time"`
}

type RoleAttr added in v0.0.24

type RoleAttr string

type Todo added in v0.0.24

type Todo struct {
	ID             int        `db:"id"`
	Content        string     `db:"content"`
	Priority       int        `db:"priority"`
	IsRemindAtTime bool       `db:"is_remind_at_time"`
	RemindAt       *time.Time `db:"remind_at"`
	RepeatMethod   string     `db:"repeat_method"`
	RepeatRule     string     `db:"repeat_rule"`
	Category       string     `db:"category"`
	Remark         string     `db:"remark"`
	Complete       bool       `db:"complete"`
	Time           time.Time  `db:"time"`
}

type Trigger added in v0.0.18

type Trigger struct {
	ID        int       `db:"id"`
	Type      string    `db:"type"`
	Kind      string    `db:"kind"`
	Flag      string    `db:"flag"`
	Secret    string    `db:"secret"`
	When      string    `db:"when"`
	MessageID int       `db:"message_id"`
	Time      time.Time `db:"time"`
}

type User added in v0.0.24

type User struct {
	ID     int    `db:"id"`
	Name   string `db:"name"`
	Mobile string `db:"mobile"`
	Remark string `db:"remark"`
	Time   string `db:"time"`
}

Jump to

Keyboard shortcuts

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