Files
artalkjs/internal/entity/page.go
T

26 lines
368 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
import (
"gorm.io/gorm"
)
type Page struct {
gorm.Model
Key string `gorm:"index;size:255"` // 页面 Key(一般为不含 hash/query 的完整 url)
Title string
AdminOnly bool
SiteName string `gorm:"index;size:255"`
AccessibleURL string
VoteUp int
VoteDown int
PV int
}
func (p Page) IsEmpty() bool {
return p.ID == 0
}