Documentation
¶
Index ¶
- type Category
- type Collection
- type Comment
- type Link
- type Post
- type PostImage
- func (postImage *PostImage) GetMediaOption() (mediaOption media_library.MediaOption)
- func (postImage *PostImage) GetSelectedType() string
- func (postImage *PostImage) ScanMediaOptions(mediaOption media_library.MediaOption) error
- func (postImage *PostImage) SetSelectedType(typ string)
- func (postImage PostImage) Validate(db *gorm.DB)
- type PostProperties
- type PostProperty
- type PostVariation
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct { gorm.Model l10n.Locale sorting.Sorting Name string `gorm:"index:name"` Code string `gorm:"index:code"` Categories []Category CategoryID uint `gorm:"index:category_id"` }
func (Category) DefaultPath ¶
type Collection ¶
type Collection struct { gorm.Model Name string `gorm:"index:name"` l10n.LocaleCreatable }
type Comment ¶
func (*Comment) BeforeCreate ¶
type Link ¶
type Link struct { ID uint `gorm:"primary_key" json:"id"` URL string Name string `gorm:"index:name"` Title string `gorm:"type:mediumtext"` ImageUrl string PostID uint }
func (*Link) BeforeCreate ¶
type Post ¶
type Post struct { gorm.Model l10n.Locale sorting.SortingDESC Name string `gorm:"index:name"` NameWithSlug slug.Slug `l10n:"sync"` Featured bool Code string `l10n:"sync" gorm:"index:code"` CategoryID uint `l10n:"sync" gorm:"index:category_id"` Category Category `l10n:"sync"` // Categories []Category `gorm:"many2many:post_categories" l10n:"sync"` Collections []Collection `l10n:"sync" gorm:"many2many:post_collections;"` Tags []Tag `l10n:"sync" gorm:"many2many:post_tags"` Comments []Comment `l10n:"sync"` Links []Link `l10n:"sync"` // gorm:"many2many:post_links"` MainImage media_library.MediaBox Images media_library.MediaBox Description string `gorm:"type:longtext"` Summary string `gorm:"type:mediumtext"` PostProperties PostProperties `sql:"type:text"` Seo qor_seo.Setting publish2.Version publish2.Schedule publish2.Visible }
func (Post) DefaultPath ¶
func (Post) MainImageURL ¶
type PostImage ¶
type PostImage struct { gorm.Model Title string Category Category CategoryID uint SelectedType string File media_library.MediaLibraryStorage `sql:"size:4294967295;" media_library:"url:/system/{{class}}/{{primary_key}}/{{column}}.{{extension}}"` }
func (*PostImage) GetMediaOption ¶
func (postImage *PostImage) GetMediaOption() (mediaOption media_library.MediaOption)
func (*PostImage) GetSelectedType ¶
func (*PostImage) ScanMediaOptions ¶
func (postImage *PostImage) ScanMediaOptions(mediaOption media_library.MediaOption) error
func (*PostImage) SetSelectedType ¶
type PostProperties ¶
type PostProperties []PostProperty
func (*PostProperties) Scan ¶
func (postProperties *PostProperties) Scan(value interface{}) error
type PostProperty ¶
type PostVariation ¶
type Tag ¶
type Tag struct { ID uint `gorm:"primary_key" json:"id"` Name string `json:"name" gorm:"index:name"` Hashtag string `json:"hashtag"` NameWithSlug qor_slug.Slug `l10n:"sync" json:"name_with_slug" gorm:"index:name_with_slug"` Seo qor_seo.Setting `json:"seo"` l10n.Locale sorting.Sorting }
func (*Tag) BeforeCreate ¶
func (Tag) DefaultPath ¶
func (*Tag) SetLanguageCode ¶
Click to show internal directories.
Click to hide internal directories.