2018-01-28 14:55:43 +08:00
|
|
|
package model
|
|
|
|
|
2018-02-03 21:20:10 +08:00
|
|
|
// Tag is tag for the bookmark
|
2018-01-28 14:55:43 +08:00
|
|
|
type Tag struct {
|
2018-02-03 16:02:28 +08:00
|
|
|
ID int64 `db:"id" json:"id"`
|
|
|
|
Name string `db:"name" json:"name"`
|
|
|
|
Deleted bool `json:"-"`
|
2018-01-28 14:55:43 +08:00
|
|
|
}
|
|
|
|
|
2018-02-03 21:20:10 +08:00
|
|
|
// Bookmark is record of a specified URL
|
2018-01-28 14:55:43 +08:00
|
|
|
type Bookmark struct {
|
2018-01-28 15:53:12 +08:00
|
|
|
ID int64 `db:"id" json:"id"`
|
|
|
|
URL string `db:"url" json:"url"`
|
|
|
|
Title string `db:"title" json:"title"`
|
|
|
|
ImageURL string `db:"image_url" json:"imageURL"`
|
|
|
|
Excerpt string `db:"excerpt" json:"excerpt"`
|
|
|
|
Author string `db:"author" json:"author"`
|
|
|
|
MinReadTime int `db:"min_read_time" json:"minReadTime"`
|
|
|
|
MaxReadTime int `db:"max_read_time" json:"maxReadTime"`
|
|
|
|
Modified string `db:"modified" json:"modified"`
|
2018-01-30 17:16:25 +08:00
|
|
|
Content string `db:"content" json:"-"`
|
2018-01-30 17:20:18 +08:00
|
|
|
HTML string `db:"html" json:"-"`
|
2018-01-28 15:53:12 +08:00
|
|
|
Tags []Tag `json:"tags"`
|
2018-01-28 14:55:43 +08:00
|
|
|
}
|