umstellung auf Service und Repository Verwendung - WIP
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package comics
|
||||
|
||||
import "time"
|
||||
|
||||
type Issue struct {
|
||||
ID string `gorm:"type:string;primary_key;"`
|
||||
CreatedAt time.Time `gorm:"column:created_date" json:"created_date"`
|
||||
UpdatedAt time.Time `gorm:"column:last_modified_date" json:"last_modified_date"`
|
||||
DeletedAt *time.Time `gorm:"column:deleted_date" json:"deleted_date"`
|
||||
Version int `gorm:"default:0" json:"version"`
|
||||
InStock bool `gorm:"column:in_stock" json:"in_stock"`
|
||||
IsRead bool `gorm:"column:is_read" json:"is_read"`
|
||||
IssueNumber string `gorm:"column:issue_number" json:"issue_number"`
|
||||
Title string `gorm:"column:title" json:"title"`
|
||||
PublishedOn time.Time `gorm:"column:published_on" json:"published_on"`
|
||||
ComicID *string `gorm:"column:comic_id" json:"comic_id"`
|
||||
Comic *Comic `gorm:"foreignKey:ComicID"`
|
||||
StoryArcID *string `gorm:"column:story_arc_id" json:"story_arc_id"`
|
||||
StoryArc *StoryArc `gorm:"foreignKey:StoryArcID"`
|
||||
VolumeID *string `gorm:"column:volume_id" json:"volume_id"`
|
||||
Volume *Volume `gorm:"foreignKey:VolumeID"`
|
||||
}
|
||||
|
||||
func (issue *Issue) TableName() string {
|
||||
return "issue"
|
||||
}
|
||||
Reference in New Issue
Block a user