add methods in Repository and Model for importing data
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
Gitea Actions Demo / build-and-test (push) Failing after 14m37s

This commit is contained in:
Thomas Peetz
2026-10-30 09:15:19 +01:00
parent 8706b3880f
commit b0cc5f0cd1
18 changed files with 437 additions and 28 deletions
+16
View File
@@ -79,6 +79,22 @@ type MediaLoFiDTO struct {
WebLink string `json:"url"`
}
func (dto MediaLoFiDTO) ConvertDTOToModel() MediaLoFi {
model := MediaLoFi{
ID: dto.ID,
CreatedAt: dto.CreatedAt.Time,
UpdatedAt: dto.UpdatedAt.Time,
DeletedAt: dto.DeletedAt,
Version: dto.Version,
FileName: dto.FileName,
Review: dto.Review,
ShouldDownload: dto.ShouldDownload,
Title: dto.Title,
WebLink: dto.WebLink,
}
return model
}
func (source MediaLoFiDTO) Equals(target MediaLoFiDTO) bool {
if config.Verbose > 1 {
slog.Info("MediaLoFiDTO#Equals", "id", source.ID)