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

This commit is contained in:
Thomas Peetz
2026-09-30 18:55:59 +02:00
parent 914e1214de
commit f5abb44466
52 changed files with 1458 additions and 146 deletions
+26
View File
@@ -16,6 +16,32 @@ func (artist *Artist) TableName() string {
return "artist"
}
type ArtistDTO struct {
ID string `json:"id"`
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"`
WebLink string `json:"weblink"`
}
func ConvertArtistsToDtos(artists []Artist) []ArtistDTO {
dtos := make([]ArtistDTO, len(artists))
for i, artist := range artists {
dtos[i] = ArtistDTO{
ID: artist.ID,
CreatedAt: artist.CreatedAt,
UpdatedAt: artist.UpdatedAt,
DeletedAt: artist.DeletedAt,
Version: artist.Version,
Name: artist.Name,
WebLink: artist.WebLink,
}
}
return dtos
}
type CreateArtistDTO struct {
Name string `json:"name" binding:"required"`
WebLink string `json:"weblink" binding:"required"`