feat: update model
This commit is contained in:
@@ -5,4 +5,3 @@ types:
|
||||
|
||||
media_resources: # table name
|
||||
type: backend/pkg/pg.MediaType
|
||||
source: backend/pkg/pg.MediaSource
|
||||
|
||||
@@ -87,7 +87,7 @@ CREATE TABLE
|
||||
id SERIAL8 PRIMARY KEY,
|
||||
media_id INT8 NOT NULL,
|
||||
type VARCHAR(128) NOT NULL,
|
||||
source jsonb default '{}'::jsonb,
|
||||
source text NOT NULL default '',
|
||||
size INT8 NOT NULL,
|
||||
publish BOOL NOT NULL,
|
||||
created_at timestamp NOT NULL default now(),
|
||||
|
||||
@@ -16,7 +16,7 @@ type MediaResources struct {
|
||||
ID int64 `sql:"primary_key" json:"id"`
|
||||
MediaID int64 `json:"media_id"`
|
||||
Type pg.MediaType `json:"type"`
|
||||
Source *string `json:"source"`
|
||||
Source string `json:"source"`
|
||||
Size int64 `json:"size"`
|
||||
Publish bool `json:"publish"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
|
||||
Reference in New Issue
Block a user