Files
stash/pkg/models/model_gallery_chapter.go
DingDongSoLong4 2ae30028ac Fix scene marker/gallery chapter update overwriting created at date (#3945)
* Add UpdatePartial to gallery chapter
* Add UpdatePartial to gallery marker
* Fix UI, use yup and useFormik
2023-07-27 09:44:06 +10:00

32 lines
747 B
Go

package models
import (
"time"
)
type GalleryChapter struct {
ID int `json:"id"`
Title string `json:"title"`
ImageIndex int `json:"image_index"`
GalleryID int `json:"gallery_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// GalleryChapterPartial represents part of a GalleryChapter object.
// It is used to update the database entry.
type GalleryChapterPartial struct {
Title OptionalString
ImageIndex OptionalInt
GalleryID OptionalInt
CreatedAt OptionalTime
UpdatedAt OptionalTime
}
func NewGalleryChapterPartial() GalleryChapterPartial {
updatedTime := time.Now()
return GalleryChapterPartial{
UpdatedAt: NewOptionalTime(updatedTime),
}
}