add methods in Repository an dModel for importing data
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
Gitea Actions Demo / build-and-test (push) Failing after 13m11s

This commit is contained in:
Thomas Peetz
2026-10-30 00:19:25 +01:00
parent 0750621b96
commit 8706b3880f
25 changed files with 486 additions and 0 deletions
+14
View File
@@ -33,6 +33,20 @@ type StoryArcDTO struct {
VolumeID *string `json:"volume_id"`
}
func (dto StoryArcDTO) ConvertDTOToModel() StoryArc {
model := StoryArc{
ID: dto.ID,
CreatedAt: dto.CreatedAt.Time,
UpdatedAt: dto.UpdatedAt.Time,
DeletedAt: dto.DeletedAt,
Version: dto.Version,
Name: dto.Name,
ComicID: dto.ComicID,
VolumeID: dto.VolumeID,
}
return model
}
func ConvertStoryArcsToDtos(storyarcs []StoryArc) []StoryArcDTO {
dtos := make([]StoryArcDTO, len(storyarcs))
for i, storyarc := range storyarcs {