models

package
v0.0.0-...-f91bbc8 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AboutContent

type AboutContent struct {
	ID bson.ObjectId `json:"id" bson:"_id"`

	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`
	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`

	Name         string        `json:"name" bson:"name"`
	Descriptions []Translation `json:"descriptions" bson:"descriptions"`
}

AboutContent struct

type Album

type Album struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Cover       string  `json:"cover" bson:"cover"`
	Title       string  `json:"title" bson:"title"`
	Description string  `json:"description" bson:"description"`
	Tracks      []Track `json:"tracks" bson:"tracks"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Album struct

type Article

type Article struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Title   string `json:"title" bson:"title"`
	Content string `json:"content" bson:"content"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Article struct

type Collaborator

type Collaborator struct {
	Email string `json:"email" bson:"email"`
	Role  string `json:"role" bson:"role"`
}

type Config

type Config struct {
	URI           string
	Database      string
	Secret        string
	GmailAddress  string
	GmailPassword string
	StripeKey     string
	BucketName    string
	BucketPubURL  string
}

Config config struct

type ContactContent

type ContactContent struct {
	ID bson.ObjectId `json:"id" bson:"_id"`

	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`
	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`

	Name    string `json:"name" bson:"name"`
	Phone   string `json:"phone" bson:"phone"`
	Email   string `json:"email" bson:"email"`
	Address string `json:"address" bson:"address"`

	FacebookURL  string `json:"facebook_url" bson:"facebook_url"`
	InstagramURL string `json:"instagram_url" bson:"instagram_url"`
	TwitterURL   string `json:"twitter_url" bson:"twitter_url"`

	CustomFields []string `json:"custom_fields" bson:"custom_fields"`
}

ContactContent struct

type EmailVerification

type EmailVerification struct {
	ID       bson.ObjectId `json:"id" bson:"_id"`
	UserID   bson.ObjectId `json:"user_id" bson:"user_id"`
	Email    string        `json:"email" bson:"email"`
	ExpireAt time.Time     `json:"expire_at" bson:"expire_at"`
}

EmailVerification struct

type File

type File struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Name string  `json:"name" bson:"name"`
	URL  string  `json:"url" bson:"url"`
	Type string  `json:"type" bson:"type"`
	Size float64 `json:"size" bson:"size"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
}

File struct

type Gallery struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	DefaultGallery bool `json:"default_gallery" bson:"default_gallery"`

	PreviewPhoto   Photo         `json:"preview_photo" bson:"-"`
	PreviewPhotoID bson.ObjectId `json:"preview_photo_id" bson:"preview_photo_id,omitempty"`

	Title        string        `json:"title" bson:"title"`
	Titles       []Translation `json:"titles" bson:"titles"`
	Descriptions []Translation `json:"descriptions" bson:"descriptions"`

	Photos []Photo `json:"photos" bson:"photos,omitempty"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Gallery struct

type Photo

type Photo struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Title   string `json:"title" bson:"title"`
	Content string `json:"content" bson:"content"`

	URL    string `json:"url" bson:"url"`
	Width  int    `json:"width" bson:"width"`
	Height int    `json:"height" bson:"height"`
	Format string `json:"format" bson:"format"`

	GalleryName string `json:"gallery_name,omitempty" bson:"gallery_name,omitempty"`

	IsGallery bool           `json:"is_gallery" bson:"is_gallery"`
	GalleryID *bson.ObjectId `json:"gallery_id,omitempty" bson:"gallery_id,omitempty"`

	IsProject bool          `json:"is_project" bson:"is_project"`
	ProjectID bson.ObjectId `json:"project_id" bson:"project_id,omitempty"`
	Size      float64       `json:"size" bson:"size"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
}

Photo struct

type Project

type Project struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Title        string        `json:"title" bson:"title"`
	Titles       []Translation `json:"titles" bson:"titles"`
	Descriptions []Translation `json:"descriptions" bson:"descriptions"`

	URL string `json:"url" bson:"url"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Project struct

type Site

type Site struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`

	DisplayName string `json:"display_name" bson:"display_name"`
	Name        string `json:"name" bson:"name"`

	Modules []constants.Module `json:"modules" bson:"modules"`

	/* Emails */
	Collaborators []Collaborator `json:"collaborators" bson:"collaborators"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`

	/* Dynamic data */
	Favorite  bool    `json:"favorite" bson:"-"`
	Role      string  `json:"role" bson:"-"`
	TotalSize float64 `json:"total_size" bson:"-"`
}

Site struct

type Track

type Track struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	AlbumID bson.ObjectId `json:"album_id" bson:"album_id"`

	Image   string `json:"image" bson:"image"`
	Title   string `json:"title" bson:"title"`
	URL     string `json:"url" bson:"url"`
	Content string `json:"content" bson:"content"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Track struct

type Translation

type Translation struct {
	LanguageName string `json:"language_name" bson:"language_name"`
	LanguageCode string `json:"language_code" bson:"language_code"`
	Content      string `json:"content" bson:"content"`
}

Translation struct

type User

type User struct {
	ID bson.ObjectId `json:"id" bson:"_id,omitempty"`

	FullName string `json:"fullname" bson:"fullname"`
	Email    string `json:"email" bson:"email"`
	Password string `json:"password" bson:"password"`

	Country string `json:"country" bson:"country"`
	City    string `json:"city" bson:"city"`
	Address string `json:"address" bson:"address"`
	ZIP     string `json:"zip" bson:"zip"`
	State   string `json:"state" bson:"state"`

	EmailVerified bool `json:"email_verified" bson:"email_verified"`

	StripeID             string `json:"-" bson:"stripe_id"`
	ActiveSubscriptionID string `json:"-" bson:"active_subscription_id"`
	Professional         bool   `json:"professional" bson:"professional"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`

	FavoriteSites []bson.ObjectId `json:"favorite_sites" bson:"favorite_sites"`
}

User struct

type Video

type Video struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Title      string `json:"title" bson:"title"`
	Content    string `json:"content" bson:"content"`
	YouTubeURL string `json:"youtube_url" bson:"youtube_url"`

	VideoGroupID bson.ObjectId `json:"video_group_id" bson:"video_group_id"`
	Index        int           `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

Video struct

type VideoGroup

type VideoGroup struct {
	ID      bson.ObjectId `json:"id" bson:"_id"`
	ShortID string        `json:"short_id" bson:"short_id"`

	OwnerID bson.ObjectId `json:"owner_id" bson:"owner_id"`
	SiteID  bson.ObjectId `json:"site_id" bson:"site_id"`

	Title  string  `json:"title" bson:"title"`
	Image  string  `json:"image" bson:"image"`
	Videos []Video `json:"videos" bson:"videos"`

	Index int `json:"index" bson:"index"`

	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}

VideoGroup struct

Jump to

Keyboard shortcuts

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