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
+13 -12
View File
@@ -1,6 +1,7 @@
package models
import (
"kontor-api-gin/internal/helpers"
"time"
)
@@ -28,16 +29,16 @@ func (comic *Comic) TableName() string {
}
type ComicDTO 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"`
Title string `json:"title"`
PublisherID *string `json:"publisher_id"`
CurrentOrder bool `json:"current_order"`
Completed bool `json:"completed"`
WebLink string `json:"weblink"`
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"`
Title string `json:"title"`
PublisherID *string `json:"publisher_id"`
CurrentOrder bool `json:"current_order"`
Completed bool `json:"completed"`
WebLink string `json:"weblink"`
}
func ConvertComicsToDtos(comics []Comic) []ComicDTO {
@@ -45,8 +46,8 @@ func ConvertComicsToDtos(comics []Comic) []ComicDTO {
for i, comic := range comics {
dtos[i] = ComicDTO{
ID: comic.ID,
CreatedAt: comic.CreatedAt,
UpdatedAt: comic.UpdatedAt,
CreatedAt: helpers.KontorTime{Time: comic.CreatedAt},
UpdatedAt: helpers.KontorTime{Time: comic.UpdatedAt},
DeletedAt: comic.DeletedAt,
Version: comic.Version,
Title: comic.Title,