Documentation ¶
Overview ¶
Package entity defines main entities for business logic (services), data base mapping and HTTP response objects if suitable. Each logic group entities in own file.
Package entity defines main entities for business logic (services), data base mapping and HTTP response objects if suitable. Each logic group entities in own file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { common.Model Slug string `json:"slug" gorm:"column:slug;uniqueIndex"` Name string `json:"name" gorm:"column:name"` }
Translation -.
type Category ¶
type Category struct { common.Model Slug string `json:"slug" gorm:"column:slug;uniqueIndex"` Name string `json:"name" gorm:"column:name"` Description string `json:"description" gorm:"column:description"` }
Translation -.
type Chapter ¶
type Chapter struct { common.Model CID string `json:"cid" gorm:"column:cid;uniqueIndex"` StoryID int `json:"story_id" gorm:"column:story_id"` Slug string `json:"slug" gorm:"column:slug"` Name string `json:"name" gorm:"column:name"` Content string `json:"content" gorm:"column:content"` }
Translation -.
type Story ¶
type Story struct { common.Model TID string `json:"tid" gorm:"column:tid;uniqueIndex"` Slug string `json:"slug" gorm:"column:slug;uniqueIndex"` Name string `json:"name" gorm:"column:name"` Thumbnail string `json:"thumbnail" gorm:"column:thumbnail"` AuthorId int `json:"author_id" gorm:"column:author_id"` Author Author `json:"author" gorm:"foreignkey:author_id"` Categories []Category `json:"categories" gorm:"many2many:stories_categories;"` Source string `json:"source" gorm:"column:source"` Status string `json:"status" gorm:"column:status"` Rate StoryRate `json:"rate" gorm:"foreignkey:story_id"` Description string `json:"description" gorm:"column:description"` Chapters []Chapter `json:"chapters" gorm:"foreignkey:story_id"` }
Translation -.
type StoryList ¶
type StoryList struct { common.Model Slug string `json:"slug" gorm:"column:slug;uniqueIndex"` Name string `json:"name" gorm:"column:name"` Description string `json:"description" gorm:"column:description"` }
Translation -.
type StoryRate ¶
type Translation ¶
type Translation struct { common.Model Source string `json:"source" example:"auto"` Destination string `json:"destination" example:"en"` Original string `json:"original" example:"текст для перевода"` Translation string `json:"translation" example:"text for translation"` }
Translation -.
func (Translation) TableName ¶
func (Translation) TableName() string
Click to show internal directories.
Click to hide internal directories.