models

package
v0.0.0-...-6677412 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoriesPaging

type CategoriesPaging struct {
	Nodes []*Category `json:"nodes"`
	Total int         `json:"total"`
}

CategoriesPaging model

type Category

type Category struct {
	ID              uint            `gorm:"primary_key" json:"id"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	DeletedAt       *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name            string          `gorm:"column:name" json:"name"`
	Slug            string          `gorm:"column:slug" json:"slug"`
	Description     postgres.Jsonb  `gorm:"column:description" json:"description"`
	HTMLDescription string          `gorm:"column:html_description" json:"html_description"`
	Medium          *Medium         `json:"medium"`
	ParentID        uint            `gorm:"column:parent_id" json:"parent_id" sql:"DEFAULT:NULL"`
	MediumID        uint            `gorm:"column:medium_id" json:"medium_id" sql:"DEFAULT:NULL"`
	SpaceID         uint            `gorm:"column:space_id" json:"space_id"`
	MetaFields      postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
}

Category model

type Claim

type Claim struct {
	ID              uint            `gorm:"primary_key" json:"id"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	DeletedAt       *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Claim           string          `gorm:"column:claim" json:"claim"`
	Slug            string          `gorm:"column:slug" json:"slug"`
	ClaimDate       *time.Time      `gorm:"column:claim_date" json:"claim_date" sql:"DEFAULT:NULL"`
	CheckedDate     *time.Time      `gorm:"column:checked_date" json:"checked_date" sql:"DEFAULT:NULL"`
	ClaimSources    postgres.Jsonb  `gorm:"column:claim_sources" json:"claim_sources"`
	Description     postgres.Jsonb  `gorm:"column:description" json:"description"`
	HTMLDescription string          `gorm:"column:html_description" json:"html_description"`
	ClaimantID      uint            `gorm:"column:claimant_id" json:"claimant_id"`
	Claimant        *Claimant       `gorm:"foreignKey:claimant_id" json:"claimant,omitempty"`
	RatingID        uint            `gorm:"column:rating_id" json:"rating_id"`
	Rating          *Rating         `gorm:"foreignKey:rating_id" json:"rating,omitempty"`
	Fact            string          `gorm:"column:fact" json:"fact"`
	ReviewSources   postgres.Jsonb  `gorm:"column:review_sources" json:"review_sources"`
	MetaFields      postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID         uint            `gorm:"column:space_id" json:"space_id"`
}

Claim model

type Claimant

type Claimant struct {
	ID              uint            `gorm:"primary_key" json:"id"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	DeletedAt       *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name            string          `gorm:"column:name" json:"name"`
	Slug            string          `gorm:"column:slug" json:"slug"`
	Description     postgres.Jsonb  `gorm:"column:description" json:"description"`
	HTMLDescription string          `gorm:"column:html_description" json:"html_description"`
	TagLine         string          `gorm:"column:tag_line" json:"tag_line"`
	MediumID        uint            `gorm:"column:medium_id" json:"medium_id" sql:"DEFAULT:NULL"`
	Medium          *Medium         `gorm:"foreignKey:medium_id" json:"medium"`
	MetaFields      postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID         uint            `gorm:"column:space_id" json:"space_id"`
}

Claimant model

type ClaimantsPaging

type ClaimantsPaging struct {
	Nodes []*Claimant `json:"nodes"`
	Total int         `json:"total"`
}

ClaimantsPaging model

type ClaimsPaging

type ClaimsPaging struct {
	Nodes []*Claim `json:"nodes"`
	Total int      `json:"total"`
}

ClaimsPaging model

type Format

type Format struct {
	ID          uint            `gorm:"primary_key" json:"id"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
	DeletedAt   *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name        string          `gorm:"column:name" json:"name" validate:"required"`
	Slug        string          `gorm:"column:slug" json:"slug" validate:"required"`
	Description string          `gorm:"column:description" json:"description"`
	MetaFields  postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID     uint            `gorm:"column:space_id" json:"space_id"`
}

Format model

type FormatsPaging

type FormatsPaging struct {
	Nodes []*Format `json:"nodes"`
	Total int       `json:"total"`
}

FormatsPaging model

type Medium

type Medium struct {
	ID          uint            `gorm:"primary_key" json:"id"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
	DeletedAt   *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name        string          `gorm:"column:name" json:"name"`
	Slug        string          `gorm:"column:slug" json:"slug"`
	Type        string          `gorm:"column:type" json:"type"`
	Title       string          `gorm:"column:title" json:"title"`
	Description string          `gorm:"column:description" json:"description"`
	Caption     string          `gorm:"column:caption" json:"caption"`
	AltText     string          `gorm:"column:alt_text" json:"alt_text"`
	FileSize    int64           `gorm:"column:file_size" json:"file_size"`
	URL         postgres.Jsonb  `gorm:"column:url" json:"url"`
	Dimensions  string          `gorm:"column:dimensions" json:"dimensions"`
	MetaFields  postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID     uint            `gorm:"column:space_id" json:"space_id"`
}

Medium model

func (*Medium) AfterFind

func (media *Medium) AfterFind(tx *gorm.DB) (err error)

AfterFind hook

type Menu struct {
	ID         uint            `gorm:"primary_key" json:"id"`
	CreatedAt  time.Time       `json:"created_at"`
	UpdatedAt  time.Time       `json:"updated_at"`
	DeletedAt  *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name       string          `gorm:"column:name" json:"name"`
	Slug       string          `gorm:"column:slug" json:"slug"`
	Menu       postgres.Jsonb  `gorm:"column:menu" json:"menu"`
	MetaFields postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID    uint            `gorm:"column:space_id" json:"space_id"`
}

Menu model

type MenusPaging struct {
	Nodes []*Menu `json:"nodes"`
	Total int     `json:"total"`
}

MenusPaging model

type Post

type Post struct {
	ID               uint            `gorm:"primary_key" json:"id"`
	CreatedAt        time.Time       `json:"created_at"`
	UpdatedAt        time.Time       `json:"updated_at"`
	DeletedAt        *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Title            string          `gorm:"column:title" json:"title"`
	Subtitle         string          `gorm:"column:subtitle" json:"subtitle"`
	Slug             string          `gorm:"column:slug" json:"slug"`
	Status           string          `gorm:"column:status" json:"status"`
	Excerpt          string          `gorm:"column:excerpt" json:"excerpt"`
	Description      postgres.Jsonb  `gorm:"column:description" json:"description" sql:"jsonb"`
	HTMLDescription  string          `gorm:"column:html_description" json:"html_description"`
	IsPage           bool            `gorm:"column:is_page" json:"is_page"`
	IsFeatured       bool            `gorm:"column:is_featured" json:"is_featured"`
	IsSticky         bool            `gorm:"column:is_sticky" json:"is_sticky"`
	IsHighlighted    bool            `gorm:"column:is_highlighted" json:"is_highlighted"`
	FeaturedMediumID uint            `gorm:"column:featured_medium_id" json:"featured_medium_id" sql:"DEFAULT:NULL"`
	FormatID         uint            `gorm:"column:format_id" json:"format_id" sql:"DEFAULT:NULL"`
	PublishedDate    *time.Time      `gorm:"column:published_date" json:"published_date"`
	Schemas          postgres.Jsonb  `gorm:"column:schemas" json:"schemas"`
	Meta             postgres.Jsonb  `gorm:"column:meta" json:"meta"`
	HeaderCode       string          `gorm:"column:header_code" json:"header_code"`
	FooterCode       string          `gorm:"column:footer_code" json:"footer_code"`
	MetaFields       postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	Tags             []Tag           `gorm:"many2many:post_tags;" json:"tags,omitempty"`
	Categories       []Category      `gorm:"many2many:post_categories;" json:"categories,omitempty"`
	Format           *Format         `gorm:"foreignKey:format_id" json:"format,omitempty"`
	Medium           *Medium         `gorm:"foreignKey:featured_medium_id" json:"medium,omitempty"`
	SpaceID          uint            `gorm:"column:space_id" json:"space_id"`
}

Post model

type PostAuthor

type PostAuthor struct {
	AuthorID uint `gorm:"column:author_id" json:"author_id"`
	PostID   uint `gorm:"column:post_id" json:"post_id"`
}

PostAuthor model

type PostCategory

type PostCategory struct {
	CategoryID uint `gorm:"column:category_id" json:"category_id"`
	PostID     uint `gorm:"column:post_id" json:"post_id"`
}

PostCategory model

type PostClaim

type PostClaim struct {
	ClaimID uint   `gorm:"column:claim_id" json:"claim_id"`
	PostID  uint   `gorm:"column:post_id" json:"post_id"`
	Claim   *Claim `json:"claim"`
}

PostClaim model

type PostFilter

type PostFilter struct {
	Slugs []string `json:"slugs"`
	Ids   []int    `json:"ids"`
}

type PostTag

type PostTag struct {
	TagID  uint `gorm:"column:tag_id" json:"tag_id"`
	PostID uint `gorm:"column:post_id" json:"post_id"`
}

PostTag model

type PostsPaging

type PostsPaging struct {
	Nodes []*Post `json:"nodes"`
	Total int     `json:"total"`
}

PostsPaging model

type Rating

type Rating struct {
	ID               uint            `gorm:"primary_key" json:"id"`
	CreatedAt        time.Time       `json:"created_at"`
	UpdatedAt        time.Time       `json:"updated_at"`
	DeletedAt        *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name             string          `gorm:"column:name" json:"name"`
	Slug             string          `gorm:"column:slug" json:"slug"`
	Description      postgres.Jsonb  `gorm:"column:description" json:"description"`
	BackgroundColour postgres.Jsonb  `gorm:"column:background_colour" json:"background_colour" swaggertype:"primitive,string"`
	TextColour       postgres.Jsonb  `gorm:"column:text_colour" json:"text_colour" swaggertype:"primitive,string"`
	HTMLDescription  string          `gorm:"column:html_description" json:"html_description"`
	NumericValue     int             `gorm:"column:numeric_value" json:"numeric_value"`
	MediumID         uint            `gorm:"column:medium_id" json:"medium_id" sql:"DEFAULT:NULL"`
	Medium           *Medium         `gorm:"foreignKey:medium_id" json:"medium"`
	MetaFields       postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID          uint            `gorm:"column:space_id" json:"space_id"`
}

Rating model

type RatingsPaging

type RatingsPaging struct {
	Nodes []*Rating `json:"nodes"`
	Total int       `json:"total"`
}

RatingsPaging model

type Sitemap

type Sitemap struct {
	Slug      string    `json:"slug"`
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
}

Sitemap model

type Sitemaps

type Sitemaps string

Sitemaps model

type Space

type Space struct {
	ID                uint            `gorm:"primary_key" json:"id"`
	CreatedAt         time.Time       `json:"created_at"`
	UpdatedAt         time.Time       `json:"updated_at"`
	DeletedAt         *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name              string          `gorm:"column:name" json:"name"`
	Slug              string          `gorm:"column:slug" json:"slug"`
	SiteTitle         string          `gorm:"column:site_title" json:"site_title"`
	TagLine           string          `gorm:"column:tag_line" json:"tag_line"`
	Description       string          `gorm:"column:description" json:"description"`
	SiteAddress       string          `gorm:"column:site_address" json:"site_address"`
	LogoID            uint            `gorm:"column:logo_id" json:"logo_id" sql:"DEFAULT:NULL"`
	LogoMobileID      uint            `gorm:"column:logo_mobile_id" json:"logo_mobile_id" sql:"DEFAULT:NULL"`
	LogoMobile        *Medium         `gorm:"foreignkey:logo_mobile_id;association_foreignkey:id" json:"logo_mobile"`
	FavIconID         uint            `gorm:"column:fav_icon_id" json:"fav_icon_id" sql:"DEFAULT:NULL"`
	FavIcon           *Medium         `gorm:"foreignkey:fav_icon_id;association_foreignkey:id" json:"fav_icon"`
	MobileIconID      uint            `gorm:"column:mobile_icon_id" json:"mobile_icon_id" sql:"DEFAULT:NULL"`
	MobileIcon        *Medium         `gorm:"foreignkey:mobile_icon_id;association_foreignkey:id" json:"mobile_icon"`
	VerificationCodes postgres.Jsonb  `gorm:"column:verification_codes" json:"verification_codes"`
	SocialMediaURLs   postgres.Jsonb  `gorm:"column:social_media_urls" json:"social_media_urls"`
	ContactInfo       postgres.Jsonb  `gorm:"column:contact_info" json:"contact_info"`
	HeaderCode        string          `gorm:"column:header_code" json:"header_code"`
	FooterCode        string          `gorm:"column:footer_code" json:"footer_code"`
	MetaFields        postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	OrganisationID    int             `gorm:"column:organisation_id" json:"organisation_id"`
}

Space model

type Tag

type Tag struct {
	ID              uint            `gorm:"primary_key" json:"id"`
	CreatedAt       time.Time       `json:"created_at"`
	UpdatedAt       time.Time       `json:"updated_at"`
	DeletedAt       *gorm.DeletedAt `sql:"index" json:"deleted_at"`
	Name            string          `gorm:"column:name" json:"name" validate:"required"`
	Slug            string          `gorm:"column:slug" json:"slug" validate:"required"`
	Description     string          `gorm:"column:description" json:"description"`
	HTMLDescription string          `gorm:"column:html_description" json:"html_description"`
	MetaFields      postgres.Jsonb  `gorm:"column:meta_fields" json:"meta_fields"`
	SpaceID         uint            `gorm:"column:space_id" json:"space_id"`
}

Tag model

type TagsPaging

type TagsPaging struct {
	Nodes []*Tag `json:"nodes"`
	Total int    `json:"total"`
}

TagsPaging model

type User

type User struct {
	ID               uint           `gorm:"primary_key" json:"id"`
	CreatedAt        time.Time      `json:"created_at"`
	UpdatedAt        time.Time      `json:"updated_at"`
	Slug             string         `gorm:"column:slug" json:"slug"`
	Email            string         `gorm:"column:email;unique_index" json:"email"`
	FirstName        string         `gorm:"column:first_name" json:"first_name"`
	LastName         string         `gorm:"column:last_name" json:"last_name"`
	DisplayName      string         `gorm:"column:display_name" json:"display_name"`
	BirthDate        string         `gorm:"column:birth_date" json:"birth_date"`
	Gender           string         `gorm:"column:gender" json:"gender"`
	SocialMediaURLs  postgres.Jsonb `gorm:"column:social_media_urls" json:"social_media_urls"`
	Description      string         `gorm:"column:description" json:"description"`
	FeaturedMediumID uint           `gorm:"column:featured_medium_id" json:"featured_medium_id" sql:"DEFAULT:NULL"`
	Medium           *Medium        `gorm:"foreignKey:featured_medium_id" json:"medium"`
}

User model

type UsersPaging

type UsersPaging struct {
	Nodes []*User `json:"nodes"`
	Total int     `json:"total"`
}

UsersPaging model

Jump to

Keyboard shortcuts

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