2021-11-13 13:55:44 +02:00
|
|
|
// Code generated by "gocqlx/cmd/schemagen"; DO NOT EDIT.
|
|
|
|
|
|
2024-06-26 13:32:47 -04:00
|
|
|
package schemagentest
|
2021-11-13 13:55:44 +02:00
|
|
|
|
2021-12-12 09:34:17 +01:00
|
|
|
import (
|
2024-06-26 13:32:47 -04:00
|
|
|
"github.com/gocql/gocql"
|
2024-07-10 07:49:07 +02:00
|
|
|
"github.com/scylladb/gocqlx/v3"
|
|
|
|
|
"github.com/scylladb/gocqlx/v3/table"
|
2021-12-12 09:34:17 +01:00
|
|
|
)
|
2021-11-13 13:55:44 +02:00
|
|
|
|
2021-11-17 11:49:42 +01:00
|
|
|
// Table models.
|
|
|
|
|
var (
|
|
|
|
|
Playlists = table.New(table.Metadata{
|
|
|
|
|
Name: "playlists",
|
|
|
|
|
Columns: []string{
|
|
|
|
|
"album",
|
|
|
|
|
"artist",
|
|
|
|
|
"id",
|
|
|
|
|
"song_id",
|
|
|
|
|
"title",
|
|
|
|
|
},
|
|
|
|
|
PartKey: []string{
|
|
|
|
|
"id",
|
|
|
|
|
},
|
|
|
|
|
SortKey: []string{
|
|
|
|
|
"title",
|
|
|
|
|
"album",
|
|
|
|
|
"artist",
|
|
|
|
|
},
|
|
|
|
|
})
|
2021-11-13 13:55:44 +02:00
|
|
|
|
2021-11-17 11:49:42 +01:00
|
|
|
Songs = table.New(table.Metadata{
|
|
|
|
|
Name: "songs",
|
|
|
|
|
Columns: []string{
|
|
|
|
|
"album",
|
|
|
|
|
"artist",
|
|
|
|
|
"data",
|
2024-06-26 13:32:47 -04:00
|
|
|
"duration",
|
2021-11-17 11:49:42 +01:00
|
|
|
"id",
|
|
|
|
|
"tags",
|
|
|
|
|
"title",
|
|
|
|
|
},
|
|
|
|
|
PartKey: []string{
|
|
|
|
|
"id",
|
|
|
|
|
},
|
|
|
|
|
SortKey: []string{},
|
|
|
|
|
})
|
|
|
|
|
)
|
2021-12-12 09:34:17 +01:00
|
|
|
|
2025-06-10 19:18:46 +03:00
|
|
|
// Materialized view models.
|
|
|
|
|
var (
|
|
|
|
|
ComposersByName = table.New(table.Metadata{
|
|
|
|
|
Name: "composers_by_name",
|
|
|
|
|
Columns: []string{
|
|
|
|
|
"id",
|
|
|
|
|
"name",
|
|
|
|
|
},
|
|
|
|
|
PartKey: []string{
|
|
|
|
|
"id",
|
|
|
|
|
},
|
|
|
|
|
SortKey: []string{
|
|
|
|
|
"name",
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
|
2022-05-08 15:08:09 +02:00
|
|
|
type AlbumUserType struct {
|
2024-06-26 13:32:47 -04:00
|
|
|
gocqlx.UDT
|
2022-05-08 15:08:09 +02:00
|
|
|
Name string
|
|
|
|
|
Songwriters []string
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-12 09:34:17 +01:00
|
|
|
type PlaylistsStruct struct {
|
2022-05-08 15:08:09 +02:00
|
|
|
Album AlbumUserType
|
2021-12-12 09:34:17 +01:00
|
|
|
Artist string
|
|
|
|
|
Id [16]byte
|
|
|
|
|
SongId [16]byte
|
|
|
|
|
Title string
|
|
|
|
|
}
|
|
|
|
|
type SongsStruct struct {
|
2024-06-26 13:32:47 -04:00
|
|
|
Album string
|
|
|
|
|
Artist string
|
|
|
|
|
Data []byte
|
|
|
|
|
Duration gocql.Duration
|
|
|
|
|
Id [16]byte
|
|
|
|
|
Tags []string
|
|
|
|
|
Title string
|
2021-12-12 09:34:17 +01:00
|
|
|
}
|
2025-06-10 19:18:46 +03:00
|
|
|
|
|
|
|
|
type ComposersByNameStruct struct {
|
|
|
|
|
Id [16]byte
|
|
|
|
|
Name string
|
|
|
|
|
}
|