feat: add list profile

This commit is contained in:
Rogee
2024-12-09 20:33:35 +08:00
parent af8a8e9469
commit 0c9cb498d5
12 changed files with 125 additions and 40 deletions

View File

@@ -1,17 +1,28 @@
package medias
import (
"backend/database/models/qvyun/public/model"
"time"
"backend/pkg/db"
"backend/pkg/pg"
)
type ListFilter struct {
db.Pagination
Title *string `json:"title"`
Bought *bool `json:"bought"`
Title *string `json:"title,omitempty"`
Bought *bool `json:"bought,omitempty"`
}
type ListItem struct {
model.Medias
Bought bool `json:"bought"`
ID int64 `json:"-"`
Hash string `json:"hash"`
Title string `json:"title"`
Description string `json:"description"`
Duration int64 `json:"duration"`
Price int64 `json:"price"`
Discount int64 `json:"discount"`
Resources pg.MediaResources `json:"resources"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Bought bool `json:"bought"`
}