mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Model refactor, part 2 (#4092)
* Move conversions into changesetTranslator * Improve mutation error messages * Use models.New and models.NewPartial everywhere * Replace getStashIDsFor functions * Remove ImageCreateInput * Remove unused parameters * Refactor matching functions --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,14 @@ type SceneMarker struct {
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func NewSceneMarker() SceneMarker {
|
||||
currentTime := time.Now()
|
||||
return SceneMarker{
|
||||
CreatedAt: currentTime,
|
||||
UpdatedAt: currentTime,
|
||||
}
|
||||
}
|
||||
|
||||
// SceneMarkerPartial represents part of a SceneMarker object.
|
||||
// It is used to update the database entry.
|
||||
type SceneMarkerPartial struct {
|
||||
@@ -26,8 +34,8 @@ type SceneMarkerPartial struct {
|
||||
}
|
||||
|
||||
func NewSceneMarkerPartial() SceneMarkerPartial {
|
||||
updatedTime := time.Now()
|
||||
currentTime := time.Now()
|
||||
return SceneMarkerPartial{
|
||||
UpdatedAt: NewOptionalTime(updatedTime),
|
||||
UpdatedAt: NewOptionalTime(currentTime),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user