images

package module
v0.0.0-...-7477414 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentModel

type CommentModel struct {
	gorm.Model
	Image   ImageModel
	ImageID uint
	User    ImageUserModel
	UserID  uint
	Body    string `gorm:"size:2048"`
}

type FavoriteModel

type FavoriteModel struct {
	gorm.Model
	Favorite     ImageModel
	FavoriteID   uint
	FavoriteBy   ImageUserModel
	FavoriteByID uint
}

type ImageModel

type ImageModel struct {
	gorm.Model
	Slug        string `gorm:unique_index`
	Title       string
	Description string `gorm:"size2048"`
	Body        string `gorm:"size:2048"`
	User        ImageUserModel
	UserID      uint
	Tags        []TagModel     `gorm:"many2many:article_tags;"`
	Comments    []CommentModel `gorm:"ForeignKey:ArticleID"`
}

type ImageUserModel

type ImageUserModel struct {
	gorm.Model
	UserModel      users.UserModel
	UserModelID    uint
	ImageModels    []ImageModel    `gorm:"ForeignKey:AuthorID"`
	FavoriteModels []FavoriteModel `gorm:"ForeignKey:FavoriteByID"`
}

type TagModel

type TagModel struct {
	gorm.Model
	Tag         string       `gorm:"unique_index"`
	ImageModels []ImageModel `gorm:"many2many:article_tags;"`
}

Jump to

Keyboard shortcuts

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