WIP: Export Kontor DB
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s

This commit is contained in:
Thomas Peetz
2026-10-01 17:40:17 +02:00
parent f5abb44466
commit 4aaf580735
47 changed files with 1101 additions and 369 deletions
+14 -11
View File
@@ -1,6 +1,9 @@
package models
import "time"
import (
"kontor-api-gin/internal/helpers"
"time"
)
type StoryArc struct {
ID string `gorm:"type:string;primary_key;" json:"id"`
@@ -20,14 +23,14 @@ func (story_arc *StoryArc) TableName() string {
}
type StoryArcDTO struct {
ID string `json:"id" binding:"required"`
CreatedAt time.Time `json:"created_date"`
UpdatedAt time.Time `json:"last_modified_date"`
DeletedAt *time.Time `json:"deleted_date,omitempty"`
Version int `json:"version"`
Name string `json:"name"`
ComicID *string `json:"comic_id"`
VolumeID *string `json:"volume_id"`
ID string `json:"id" binding:"required"`
CreatedAt helpers.KontorTime `json:"created_date"`
UpdatedAt helpers.KontorTime `json:"last_modified_date"`
DeletedAt *time.Time `json:"deleted_date,omitempty"`
Version int `json:"version"`
Name string `json:"name"`
ComicID *string `json:"comic_id"`
VolumeID *string `json:"volume_id"`
}
func ConvertStoryArcsToDtos(storyarcs []StoryArc) []StoryArcDTO {
@@ -35,8 +38,8 @@ func ConvertStoryArcsToDtos(storyarcs []StoryArc) []StoryArcDTO {
for i, storyarc := range storyarcs {
dtos[i] = StoryArcDTO{
ID: storyarc.ID,
CreatedAt: storyarc.CreatedAt,
UpdatedAt: storyarc.UpdatedAt,
CreatedAt: helpers.KontorTime{Time: storyarc.CreatedAt},
UpdatedAt: helpers.KontorTime{Time: storyarc.UpdatedAt},
DeletedAt: storyarc.DeletedAt,
Version: storyarc.Version,
Name: storyarc.Name,