feat: 更新用户、订单、媒体资产和租户模型,添加新的字段类型和结构体
This commit is contained in:
13
backend/database/fields/media_assets.go
Normal file
13
backend/database/fields/media_assets.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package fields
|
||||
|
||||
// MediaAssetMeta 媒体资源元数据
|
||||
type MediaAssetMeta struct {
|
||||
Hash string `json:"hash,omitempty"`
|
||||
Duration float64 `json:"duration,omitempty"` // 秒
|
||||
Width int `json:"width,omitempty"`
|
||||
Height int `json:"height,omitempty"`
|
||||
Bitrate int `json:"bitrate,omitempty"` // bps
|
||||
Codec string `json:"codec,omitempty"`
|
||||
Format string `json:"format,omitempty"`
|
||||
Size int64 `json:"size,omitempty"` // 字节
|
||||
}
|
||||
7
backend/database/fields/tenants.go
Normal file
7
backend/database/fields/tenants.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields
|
||||
|
||||
// TenantConfig 租户配置
|
||||
type TenantConfig struct {
|
||||
Theme string `json:"theme,omitempty"`
|
||||
Features []string `json:"features,omitempty"`
|
||||
}
|
||||
9
backend/database/fields/users.go
Normal file
9
backend/database/fields/users.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package fields
|
||||
|
||||
// UserLocation 用户位置信息
|
||||
type UserLocation struct {
|
||||
Province string `json:"province"`
|
||||
City string `json:"city"`
|
||||
District string `json:"district,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user