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
+14
View File
@@ -60,6 +60,20 @@ type MediaVideoDTO struct {
ShouldDownload bool `json:"should_download"`
}
func (dto MediaVideoDTO) ConvertDTOToModel() MediaVideo {
model := MediaVideo{
ID: dto.ID,
CreatedAt: dto.CreatedAt.Time,
UpdatedAt: dto.UpdatedAt.Time,
DeletedAt: dto.DeletedAt,
Version: dto.Version,
Review: dto.Review,
Title: dto.Title,
WebLink: dto.WebLink,
}
return model
}
func ConvertMediaVideosToDtos(media_videos []MediaVideo) []MediaVideoDTO {
dtos := make([]MediaVideoDTO, len(media_videos))
for i, media_video := range media_videos {