playlist: introduce coremodel schema, swap in for backend DTO types (#56048)

* Add simplest possible playlist schema

* Add @grafana(decisionNeeded) attributes

* playlistid, not playlist_id
This commit is contained in:
sam boyer
2022-09-30 06:33:11 -04:00
committed by GitHub
parent d2601003cf
commit 9ec7b202b6
9 changed files with 315 additions and 33 deletions
@@ -42,7 +42,7 @@ func (s *sqlxStore) Insert(ctx context.Context, cmd *playlist.CreatePlaylistComm
for _, item := range cmd.Items {
playlistItems = append(playlistItems, playlist.PlaylistItem{
PlaylistId: p.Id,
Type: item.Type,
Type: string(item.Type),
Value: item.Value,
Order: item.Order,
Title: item.Title,
@@ -94,7 +94,7 @@ func (s *sqlxStore) Update(ctx context.Context, cmd *playlist.UpdatePlaylistComm
for index, item := range cmd.Items {
playlistItems = append(playlistItems, playlist.PlaylistItem{
PlaylistId: p.Id,
Type: item.Type,
Type: string(item.Type),
Value: item.Value,
Order: index + 1,
Title: item.Title,