fix: issues

This commit is contained in:
Rogee
2024-12-05 11:32:00 +08:00
parent 9ddd3f61ec
commit c6313f234b
17 changed files with 206 additions and 396 deletions

View File

@@ -1,24 +0,0 @@
//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package model
import (
"backend/pkg/pg"
"time"
)
type MediaResources struct {
ID int64 `sql:"primary_key" json:"id"`
MediaID int64 `json:"media_id"`
Type pg.MediaType `json:"type"`
Source string `json:"source"`
Size int64 `json:"size"`
Publish bool `json:"publish"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}

View File

@@ -8,19 +8,21 @@
package model
import (
"backend/pkg/pg"
"github.com/google/uuid"
"time"
)
type Medias struct {
ID int64 `sql:"primary_key" json:"id"`
UUID uuid.UUID `json:"uuid"`
TenantID int64 `json:"tenant_id"`
Title string `json:"title"`
Description string `json:"description"`
Price int64 `json:"price"`
Discount int64 `json:"discount"`
Publish bool `json:"publish"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ID int64 `sql:"primary_key" json:"id"`
UUID uuid.UUID `json:"uuid"`
TenantID int64 `json:"tenant_id"`
Title string `json:"title"`
Description string `json:"description"`
Price int64 `json:"price"`
Discount int64 `json:"discount"`
Publish bool `json:"publish"`
Resources pg.MediaResources `json:"resources"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}