models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAdminRole = Role{
	Id:      "admin",
	Name:    "admin",
	Comment: "admin",
}
View Source
var DefaultAdminUserInfo = UserInfo{
	Id:            "admin",
	LoginName:     "admin",
	LoginPassword: "3ef7b7e37a0fe84e4c5cdcd1934db0852f608c5c925751b9ef6cf872eb6eeaca",
	Salt:          "init",
	UserName:      "admin",
	Email:         "admin@cali.io",
}
View Source
var DefaultAdminUserInfoRole = UserInfoRoleLink{
	Id:       "admin",
	UserInfo: "admin",
	Role:     "admin",
}
View Source
var DefaultSysConfig = make([]SysConfig, 0)
View Source
var DefaultUserInfo = UserInfo{
	Id:            "init",
	LoginName:     "anyone",
	LoginPassword: "9fafdfffa1222faddec96c954ed67618aa78808842c8753d6d788e77258ada82",
	Salt:          "init",
	UserName:      "anyone",
	Email:         "anyone@cali.io",
}
View Source
var DefaultUserInfoRole = UserInfoRoleLink{
	Id:       "user",
	UserInfo: "init",
	Role:     "user",
}
View Source
var DefaultUserRole = Role{
	Id:      "user",
	Name:    "user",
	Comment: "user",
}
View Source
var DefaultWatcherRole = Role{
	Id:      "watcher",
	Name:    "watcher",
	Comment: "watcher",
}
View Source
var RoleActions = make([]RoleAction, 0)

Functions

This section is empty.

Types

type Api

type Api struct {
	Result     bool        `json:"result"`
	StatusCode int         `json:"statusCode"`
	Message    string      `json:"message"`
	Info       interface{} `json:"info"`
}

func NewErrorApi

func NewErrorApi() Api

func NewErrorApiWithInfo

func NewErrorApiWithInfo(info interface{}) Api

func NewErrorApiWithMessageAndInfo

func NewErrorApiWithMessageAndInfo(message string, info interface{}) Api

func NewOKApi

func NewOKApi() Api

func NewOKApiWithInfo

func NewOKApiWithInfo(info interface{}) Api

func NewOKApiWithMessageAndInfo

func NewOKApiWithMessageAndInfo(message string, info interface{}) Api

type Author

type Author struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Name string `json:"name" xorm:"'name'"`
	Sort string `json:"sort" xorm:"'sort'"`
	Link string `json:"link" xorm:"'link'"`
}

func (Author) TableName

func (Author) TableName() string

type Book

type Book struct {
	Id           int       `json:"id" xorm:"pk 'id'"`
	Title        string    `json:"title" xorm:"'title'"`
	Sort         string    `json:"sort" xorm:"'sort'"`
	Timestamp    time.Time `json:"timestamp"  xorm:"'timestamp'"`
	Pubdate      time.Time `json:"pubdate"  xorm:"'pubdate'"`
	SeriesIndex  float64   `json:"series_index"  xorm:"'series_index'"`
	AuthorSort   string    `json:"author_sort"  xorm:"'author_sort'"`
	Isbn         string    `json:"isbn"  xorm:"'isbn'"`
	Lccn         string    `json:"lccn"  xorm:"'lccn'"`
	Path         string    `json:"path"  xorm:"'path'"`
	Flags        int       `json:"flags"  xorm:"'flags'"`
	Uuid         string    `json:"uuid"  xorm:"'uuid'"`
	HasCover     int       `json:"has_cover"  xorm:"'has_cover'"`
	LastModified time.Time `json:"last_modified"  xorm:"'last_modified'"`
}

func (Book) TableName

func (Book) TableName() string

type BookPluginData

type BookPluginData struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Book int    `json:"book" xorm:"'book'"`
	Name string `json:"name"  xorm:"'name'"`
	Val  string `json:"val"  xorm:"'val'"`
}

func (BookPluginData) TableName

func (BookPluginData) TableName() string
type BookRatingLink struct {
	Id     int `json:"id" xorm:"pk 'id'"`
	Book   int `json:"book" xorm:"'book'"`
	Rating int `json:"rating" xorm:"'rating'"`
}

func (BookRatingLink) TableName

func (BookRatingLink) TableName() string
type BookSerieLink struct {
	Id     int `json:"id" xorm:"pk 'id'"`
	Book   int `json:"book" xorm:"'book'"`
	Series int `json:"series" xorm:"'series'"`
}

func (BookSerieLink) TableName

func (BookSerieLink) TableName() string
type BookTagLink struct {
	Id   int `json:"id" xorm:"pk 'id'"`
	Book int `json:"book" xorm:"'book'"`
	Tag  int `json:"series" xorm:"'tag'"`
}

func (BookTagLink) TableName added in v0.0.2

func (BookTagLink) TableName() string

type BookVo

type BookVo struct {
	Id           int       `json:"id" xorm:"pk 'id'"`
	Title        string    `json:"title" xorm:"'title'"` // book name
	Sort         string    `json:"sort" xorm:"'sort'"`
	Timestamp    time.Time `json:"timestamp"  xorm:"'timestamp'"`
	Pubdate      time.Time `json:"pubdate"  xorm:"'pubdate'"`
	SeriesIndex  float64   `json:"series_index"  xorm:"'series_index'"`
	AuthorSort   string    `json:"author_sort"  xorm:"'author_sort'"`
	Isbn         string    `json:"isbn"  xorm:"'isbn'"`
	Lccn         string    `json:"lccn"  xorm:"'lccn'"`
	Path         string    `json:"path"  xorm:"'path'"`
	Flags        int       `json:"flags"  xorm:"'flags'"`
	Uuid         string    `json:"uuid"  xorm:"'uuid'"`
	HasCover     int       `json:"has_cover"  xorm:"'has_cover'"`
	LastModified time.Time `json:"last_modified"  xorm:"'last_modified'"`

	Rating int `json:"rating" xorm:"'rating'"`

	Name string `json:"name" xorm:"'name'"` //author name

	Comments string `json:"comments" xorm:"'comments'"` //comments's text only use in single book

	Format string `json:"format" xorm:"'format'"`
}

type Comments

type Comments struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Book int    `json:"book" xorm:"'book'"`
	Text string `json:"text" xorm:"'text'"`
}

func (Comments) TableName

func (Comments) TableName() string

type ConversionOption

type ConversionOption struct {
	Id     int    `json:"id" xorm:"pk 'id'"`
	Format string `json:"format" xorm:"'format'"`
	Book   int    `json:"book" xorm:"'book'"`
	Data   string `json:"data" xorm:"'data'"`
}

func (ConversionOption) TableName

func (ConversionOption) TableName() string

type CustomColumn

type CustomColumn struct {
	Id            int `json:"id" xorm:"pk 'id'"`
	Label         string
	Name          string
	Datatype      string
	MarkForDelete int
	Editable      int
	Display       string
	IsMultiple    int
	Normalized    int
}

func (CustomColumn) TableName

func (CustomColumn) TableName() string

type Data

type Data struct {
	Id               int    `json:"id" xorm:"pk 'id'"`
	Book             int    `json:"book" xorm:"'book'"`
	Format           string `json:"format" xorm:"'format'"`
	UncompressedSize int    `json:"uncompressed_size" xorm:"'uncompressed_size'"`
	Name             string `json:"name" xorm:"'name'"`
}

func (Data) TableName

func (Data) TableName() string

type Feed

type Feed struct {
	Id     int    `json:"id" xorm:"pk 'id'"`
	Title  string `json:"title" xorm:"'title'"`
	Script string `json:"script" xorm:"'script'"`
}

func (Feed) TableName

func (Feed) TableName() string

type Identifier

type Identifier struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Book int    `json:"book" xorm:"'book'"`
	Type string `json:"type"  xorm:"'type'"`
	Val  string `json:"val"  xorm:"'val'"`
}

func (Identifier) TableName

func (Identifier) TableName() string

type Language

type Language struct {
	Id       int    `json:"id" xorm:"pk 'id'"`
	LangCode string `json:"lang_code" xorm:"'lang_code'"`
}

func (Language) TableName

func (Language) TableName() string

type Publisher

type Publisher struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Name string `json:"name" xorm:"'name'"`
	Sort string `json:"sort" sort:"'sort'"`
}

func (Publisher) TableName

func (Publisher) TableName() string

type Role added in v0.0.2

type Role struct {
	Id      string `json:"id" xorm:"pk 'id'"`
	Name    string `json:"name" xorm:"varchar(32) 'name'"`
	Comment string `json:"comment" xorm:"varchar(64) 'comment'"`
}

func (Role) TableName added in v0.0.2

func (Role) TableName() string

type RoleAction added in v0.0.2

type RoleAction struct {
	Id         string `json:"id" xorm:"pk 'id'"`
	Role       string `json:"role" xorm:"varchar(32) 'role'"`
	Controller string `json:"controller" xorm:"'controller'"`
	Method     string `json:"method" xorm:"'method'"`
	Comments   string `json:"comments" xorm:"'comments'"` //zhu shi
}

func (RoleAction) TableName added in v0.0.2

func (RoleAction) TableName() string

type SysConfig added in v0.0.3

type SysConfig struct {
	Id       string `json:"id" xorm:"pk 'id'"`
	Key      string `json:"key" xorm:"'key'"`
	Value    string `json:"value" xorm:"'value'"`
	Comments string `json:"comments" xorm:"'comments'"`
}

func (SysConfig) TableName added in v0.0.3

func (SysConfig) TableName() string

type SysStatus added in v0.0.4

type SysStatus struct {
	Id       string `json:"id" xorm:"pk 'id'"`
	Key      string `json:"key" xorm:"'key'"`
	Value    string `json:"value" xorm:"'value'"`
	Comments string `json:"comments" xorm:"'comments'"`
}

func (SysStatus) TableName added in v0.0.4

func (SysStatus) TableName() string

type Tag

type Tag struct {
	Id   int    `json:"id" xorm:"pk 'id'"`
	Name string `json:"name" xorm:"'name'"`
}

func (Tag) TableName

func (Tag) TableName() string

type UserInfo added in v0.0.2

type UserInfo struct {
	Id            string `json:"id" xorm:"pk 'id'"`
	LoginName     string `json:"loginName" xorm:"varchar(64) notnull 'login_name'"`
	LoginPassword string `json:"loginPassword" xorm:"varchar(128) notnull 'login_password'"`
	Salt          string `json:"salt" xorm:"varchar(128) notnull 'salt'"`

	UserName string `json:"userName" xorm:"varchar(64) notnull 'user_name'"`
	Email    string `json:"email" xorm:"varchar(128) 'email'"`
	Img      string `json:"img" xorm:"varchar(256) 'img'"`
	Valid    int    `json:"valid" xorm:"int default 0 'valid'"` //0 有效 1 无效

}

func (UserInfo) TableName added in v0.0.2

func (UserInfo) TableName() string
type UserInfoBookDownloadLink struct {
	Id        string `json:"id" xorm:"pk 'id'"`
	UserInfo  string `json:"user_info" xorm:"'user_info'"`
	Book      int    `json:"book" xorm:"'book'"`
	CreatedAt int64  `json:"created" xorm:"created"`
	UpdatedAt int64  `json:"updated" xorm:"updated"`
}

func (UserInfoBookDownloadLink) TableName added in v0.0.4

func (UserInfoBookDownloadLink) TableName() string
type UserInfoBookUploadLink struct {
	Id        string `json:"id" xorm:"pk 'id'"`
	UserInfo  string `json:"user_info" xorm:"'user_info'"`
	Book      int    `json:"book" xorm:"'book'"`
	CreatedAt int64  `json:"created" xorm:"created"`
	UpdatedAt int64  `json:"updated" xorm:"updated"`
}

func (UserInfoBookUploadLink) TableName added in v0.0.4

func (UserInfoBookUploadLink) TableName() string
type UserInfoRoleLink struct {
	Id       string `json:"id" xorm:"pk 'id'"`
	UserInfo string `json:"user_info" xorm:"'user_info'"`
	Role     string `json:"role" xorm:"'role'"`
}

func (UserInfoRoleLink) TableName added in v0.0.2

func (UserInfoRoleLink) TableName() string

Jump to

Keyboard shortcuts

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