model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       int       `xorm:"'id' pk autoincr" json:"id"`
	Username string    `json:"username"`
	Password string    `json:"password"`
	Created  time.Time `xorm:"created"`
	Updated  time.Time `xorm:"updated"`
}

Account is account for accessing bookmarks from web interface

type Bookmark

type Bookmark struct {
	ID          int       `xorm:"'id' pk autoincr" json:"id"`
	URL         string    `xorm:"url" json:"url"`
	Title       string    `xorm:"'title' NOT NULL" json:"title"`
	ImageURL    string    `xorm:"'image_url' NOT NULL" json:"imageURL"`
	Excerpt     string    `xorm:"'excerpt' NOT NULL" json:"excerpt"`
	Author      string    `xorm:"'author' NOT NULL" json:"author"`
	MinReadTime int       `xorm:"'min_read_time' DEFAULT 0"   json:"minReadTime"`
	MaxReadTime int       `xorm:"'max_read_time' DEFAULT 0"   json:"maxReadTime"`
	Modified    time.Time `xorm:"modified"    json:"modified"`
	Content     string    `xorm:"content" json:"content"`
	HTML        string    `xorm:"html" json:"html,omitempty"`
	HasContent  bool      `xorm:"has_content" json:"hasContent"`
	Tags        []Tag     `xorm:"-"           json:"tags"`
	Created     time.Time `xorm:"created"`
	Updated     time.Time `xorm:"updated"`
}

Bookmark is record of a specified URL

type BookmarkTag

type BookmarkTag struct {
	BookmarkID int `xorm:"bookmark_id"`
	TagID      int `xorm:"tag_id"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Remember bool   `json:"remember"`
}

LoginRequest is login request

type Tag

type Tag struct {
	ID        int         `xorm:"'id' pk autoincr" json:"id"`
	Name      string      `json:"name"`
	Deleted   bool        `json:"-"`
	NBookmark int         `xorm:"n_bookmarks" json:"nBookmarks"`
	Bookmarks []*Bookmark `xorm:"-"`
	Created   time.Time   `xorm:"created"`
	Updated   time.Time   `xorm:"updated"`
}

Tag is tag for the bookmark

Jump to

Keyboard shortcuts

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