models

package
v0.0.0-...-1f40810 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 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 Comments

type Comments struct {
	CommentId          uint64    `gorm:"column:comment_ID" db:"comment_ID" json:"comment_ID" form:"comment_ID"`
	CommentPostId      uint64    `gorm:"column:comment_post_ID" db:"comment_post_ID" json:"comment_post_ID" form:"comment_post_ID"`
	CommentAuthor      string    `gorm:"column:comment_author" db:"comment_author" json:"comment_author" form:"comment_author"`
	CommentAuthorEmail string    `gorm:"column:comment_author_email" db:"comment_author_email" json:"comment_author_email" form:"comment_author_email"`
	CommentAuthorUrl   string    `gorm:"column:comment_author_url" db:"comment_author_url" json:"comment_author_url" form:"comment_author_url"`
	CommentAuthorIp    string    `gorm:"column:comment_author_IP" db:"comment_author_IP" json:"comment_author_IP" form:"comment_author_IP"`
	CommentDate        time.Time `gorm:"column:comment_date" db:"comment_date" json:"comment_date" form:"comment_date"`
	CommentDateGmt     time.Time `gorm:"column:comment_date_gmt" db:"comment_date_gmt" json:"comment_date_gmt" form:"comment_date_gmt"`
	CommentContent     string    `gorm:"column:comment_content" db:"comment_content" json:"comment_content" form:"comment_content"`
	CommentKarma       int       `gorm:"column:comment_karma" db:"comment_karma" json:"comment_karma" form:"comment_karma"`
	CommentApproved    string    `gorm:"column:comment_approved" db:"comment_approved" json:"comment_approved" form:"comment_approved"`
	CommentAgent       string    `gorm:"column:comment_agent" db:"comment_agent" json:"comment_agent" form:"comment_agent"`
	CommentType        string    `gorm:"column:comment_type" db:"comment_type" json:"comment_type" form:"comment_type"`
	CommentParent      uint64    `gorm:"column:comment_parent" db:"comment_parent" json:"comment_parent" form:"comment_parent"`
	UserId             uint64    `gorm:"column:user_id" db:"user_id" json:"user_id" form:"user_id"`
	//扩展字段
	PostTitle  string    `db:"post_title"`
	UpdateTime time.Time `gorm:"update_time" form:"update_time" json:"update_time" db:"update_time"`
}

func (Comments) PrimaryKey

func (w Comments) PrimaryKey() string

func (Comments) Table

func (w Comments) Table() string

type ImageMeta

type ImageMeta struct {
	Aperture         string   `json:"aperture,omitempty"`
	Credit           string   `json:"credit,omitempty"`
	Camera           string   `json:"camera,omitempty"`
	Caption          string   `json:"caption,omitempty"`
	CreatedTimestamp string   `json:"created_timestamp,omitempty"`
	Copyright        string   `json:"copyright,omitempty"`
	FocalLength      string   `json:"focal_length,omitempty"`
	Iso              string   `json:"iso,omitempty"`
	ShutterSpeed     string   `json:"shutter_speed,omitempty"`
	Title            string   `json:"title,omitempty"`
	Orientation      string   `json:"orientation,omitempty"`
	Keywords         []string `json:"keywords,omitempty"`
}

type MetaDataFileSize

type MetaDataFileSize struct {
	File     string `json:"file,omitempty"`
	Width    int    `json:"width,omitempty"`
	Height   int    `json:"height,omitempty"`
	MimeType string `json:"mime-type,omitempty"`
	FileSize int    `json:"filesize,omitempty"`
}

type Options

type Options struct {
	OptionId    uint64 `gorm:"column:option_id" db:"option_id" json:"option_id" form:"option_id"`
	OptionName  string `gorm:"column:option_name" db:"option_name" json:"option_name" form:"option_name"`
	OptionValue string `gorm:"column:option_value" db:"option_value" json:"option_value" form:"option_value"`
	Autoload    string `gorm:"column:autoload" db:"autoload" json:"autoload" form:"autoload"`
}

func (Options) PrimaryKey

func (w Options) PrimaryKey() string

func (Options) Table

func (w Options) Table() string

type PostArchive

type PostArchive struct {
	Year  string `db:"year"`
	Month string `db:"month"`
	Posts int    `db:"posts"`
	// contains filtered or unexported fields
}

func (PostArchive) PrimaryKey

func (w PostArchive) PrimaryKey() string

func (PostArchive) Table

func (w PostArchive) Table() string

type PostComments

type PostComments struct {
	Comments
	Children []uint64
}

type PostMeta

type PostMeta struct {
	MetaId    uint64 `db:"meta_id" json:"meta_id" form:"meta_id"`
	PostId    uint64 `db:"post_id" json:"post_id" form:"post_id"`
	MetaKey   string `db:"meta_key" json:"meta_key" form:"meta_key"`
	MetaValue string `db:"meta_value" json:"meta_value" form:"meta_value"`
}

func (PostMeta) PrimaryKey

func (p PostMeta) PrimaryKey() string

func (PostMeta) Table

func (p PostMeta) Table() string

type PostThumbnail

type PostThumbnail struct {
	Path                 string
	Width                int
	Height               int
	Srcset               string
	Sizes                string
	OriginAttachmentData WpAttachmentMetadata
}

type Posts

type Posts struct {
	Id                  uint64    `gorm:"column:ID" db:"ID" json:"ID" form:"ID"`
	PostAuthor          uint64    `gorm:"column:post_author" db:"post_author" json:"post_author" form:"post_author"`
	PostDate            time.Time `gorm:"column:post_date" db:"post_date" json:"post_date" form:"post_date"`
	PostDateGmt         time.Time `gorm:"column:post_date_gmt" db:"post_date_gmt" json:"post_date_gmt" form:"post_date_gmt"`
	PostContent         string    `gorm:"column:post_content" db:"post_content" json:"post_content" form:"post_content"`
	PostTitle           string    `gorm:"column:post_title" db:"post_title" json:"post_title" form:"post_title"`
	PostExcerpt         string    `gorm:"column:post_excerpt" db:"post_excerpt" json:"post_excerpt" form:"post_excerpt"`
	PostStatus          string    `gorm:"column:post_status" db:"post_status" json:"post_status" form:"post_status"`
	CommentStatus       string    `gorm:"column:comment_status" db:"comment_status" json:"comment_status" form:"comment_status"`
	PingStatus          string    `gorm:"column:ping_status" db:"ping_status" json:"ping_status" form:"ping_status"`
	PostPassword        string    `gorm:"column:post_password" db:"post_password" json:"post_password" form:"post_password"`
	PostName            string    `gorm:"column:post_name" db:"post_name" json:"post_name" form:"post_name"`
	ToPing              string    `gorm:"column:to_ping" db:"to_ping" json:"to_ping" form:"to_ping"`
	Pinged              string    `gorm:"column:pinged" db:"pinged" json:"pinged" form:"pinged"`
	PostModified        time.Time `gorm:"column:post_modified" db:"post_modified" json:"post_modified" form:"post_modified"`
	PostModifiedGmt     time.Time `gorm:"column:post_modified_gmt" db:"post_modified_gmt" json:"post_modified_gmt" form:"post_modified_gmt"`
	PostContentFiltered string    `gorm:"column:post_content_filtered" db:"post_content_filtered" json:"post_content_filtered" form:"post_content_filtered"`
	PostParent          uint64    `gorm:"column:post_parent" db:"post_parent" json:"post_parent" form:"post_parent"`
	Guid                string    `gorm:"column:guid" db:"guid" json:"guid" form:"guid"`
	MenuOrder           int       `gorm:"column:menu_order" db:"menu_order" json:"menu_order" form:"menu_order"`
	PostType            string    `gorm:"column:post_type" db:"post_type" json:"post_type" form:"post_type"`
	PostMimeType        string    `gorm:"column:post_mime_type" db:"post_mime_type" json:"post_mime_type" form:"post_mime_type"`
	CommentCount        int64     `gorm:"column:comment_count" db:"comment_count" json:"comment_count" form:"comment_count"`

	//扩展字段
	TermsId            uint64   `db:"terms_id" json:"terms_id"`
	TermIds            []uint64 `db:"term_ids" json:"term_ids"`
	Taxonomy           string   `db:"taxonomy" json:"taxonomy"`
	CategoryName       string   `db:"category_name" json:"category_name"`
	Categories         []string `json:"categories"`
	Tags               []string `json:"tags"`
	CategoriesHtml     string
	TagsHtml           string
	IsSticky           bool
	Thumbnail          PostThumbnail
	AttachmentMetadata WpAttachmentMetadata
	Metas              map[string]any
	Author             *Users
	// contains filtered or unexported fields
}

func (Posts) PrimaryKey

func (w Posts) PrimaryKey() string

func (Posts) Table

func (w Posts) Table() string

type TermTaxonomy

type TermTaxonomy struct {
	TermTaxonomyId uint64 `gorm:"column:term_taxonomy_id" db:"term_taxonomy_id" json:"term_taxonomy_id" form:"term_taxonomy_id"`
	TermId         uint64 `gorm:"column:term_id" db:"term_id" json:"term_id" form:"term_id"`
	Taxonomy       string `gorm:"column:taxonomy" db:"taxonomy" json:"taxonomy" form:"taxonomy"`
	Description    string `gorm:"column:description" db:"description" json:"description" form:"description"`
	Parent         uint64 `gorm:"column:parent" db:"parent" json:"parent" form:"parent"`
	Count          int64  `gorm:"column:count" db:"count" json:"count" form:"count"`
}

func (TermTaxonomy) PrimaryKey

func (w TermTaxonomy) PrimaryKey() string

func (TermTaxonomy) Table

func (w TermTaxonomy) Table() string

type Terms

type Terms struct {
	TermId    uint64 `gorm:"column:term_id" db:"term_id" json:"term_id" form:"term_id"`
	Name      string `gorm:"column:name" db:"name" json:"name" form:"name"`
	Slug      string `gorm:"column:slug" db:"slug" json:"slug" form:"slug"`
	TermGroup int64  `gorm:"column:term_group" db:"term_group" json:"term_group" form:"term_group"`
}

func (Terms) PrimaryKey

func (t Terms) PrimaryKey() string

func (Terms) Table

func (t Terms) Table() string

type TermsMy

type TermsMy struct {
	Terms
	TermTaxonomy
}

func (TermsMy) PrimaryKey

func (t TermsMy) PrimaryKey() string

func (TermsMy) Table

func (t TermsMy) Table() string

type Users

type Users struct {
	Id                uint64    `gorm:"column:ID" db:"ID" json:"ID"`
	UserLogin         string    `gorm:"column:user_login" db:"user_login" json:"user_login"`
	UserPass          string    `gorm:"column:user_pass" db:"user_pass" json:"user_pass"`
	UserNicename      string    `gorm:"column:user_nicename" db:"user_nicename" json:"user_nicename"`
	UserEmail         string    `gorm:"column:user_email" db:"user_email" json:"user_email"`
	UserUrl           string    `gorm:"column:user_url" db:"user_url" json:"user_url"`
	UserRegistered    time.Time `gorm:"column:user_registered" db:"user_registered" json:"user_registered"`
	UserActivationKey string    `gorm:"column:user_activation_key" db:"user_activation_key" json:"user_activation_key"`
	UserStatus        int       `gorm:"column:user_status" db:"user_status" json:"user_status"`
	DisplayName       string    `gorm:"column:display_name" db:"display_name" json:"display_name"`
}

func (Users) PrimaryKey

func (u Users) PrimaryKey() string

func (Users) Table

func (u Users) Table() string

type VideoMeta

type VideoMeta struct {
	Bitrate          int    `json:"bitrate,omitempty"`
	MimeType         string `json:"mime_type,omitempty"`
	Length           int    `json:"length,omitempty"`
	LengthFormatted  string `json:"length_formatted,omitempty"`
	FileFormat       string `json:"fileformat,omitempty"`
	DataFormat       string `json:"dataformat,omitempty"`
	CreatedTimestamp int64  `json:"created_timestamp"`
}

type WpAttachmentMetadata

type WpAttachmentMetadata struct {
	Width     int                         `json:"width,omitempty"`
	Height    int                         `json:"height,omitempty"`
	File      string                      `json:"file,omitempty"`
	FileSize  int                         `json:"filesize,omitempty"`
	Sizes     map[string]MetaDataFileSize `json:"sizes,omitempty"`
	ImageMeta ImageMeta                   `json:"image_meta"`
	VideoMeta
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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