feat: update medias

This commit is contained in:
Rogee
2025-01-17 14:59:54 +08:00
parent d72f384177
commit b5583bb34a
46 changed files with 1856 additions and 119 deletions

View File

@@ -0,0 +1,23 @@
//
// 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 (
"time"
)
type Medias struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
StorageID int64 `json:"storage_id"`
Hash string `json:"hash"`
Name string `json:"name"`
MimeType string `json:"mime_type"`
Size int64 `json:"size"`
Path string `json:"path"`
}

View File

@@ -0,0 +1,32 @@
//
// 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 (
"time"
)
type Orders struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
Type int16 `json:"type"`
Status int16 `json:"status"`
OrderSerial string `json:"order_serial"`
RemoteOrderSerial string `json:"remote_order_serial"`
RefundSerial string `json:"refund_serial"`
RemoteRefundSerial string `json:"remote_refund_serial"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
Title string `json:"title"`
Description *string `json:"description"`
Meta *string `json:"meta"`
}

View File

@@ -0,0 +1,34 @@
//
// 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 (
"time"
)
type Posts struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
Type int16 `json:"type"`
Stage int16 `json:"stage"`
Status int16 `json:"status"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
Price int64 `json:"price"`
Discount int16 `json:"discount"`
Views int64 `json:"views"`
Likes int64 `json:"likes"`
Meta *string `json:"meta"`
Tags *string `json:"tags"`
Assets *string `json:"assets"`
}

View File

@@ -0,0 +1,73 @@
//
// 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 "errors"
type RiverJobState string
const (
RiverJobState_Available RiverJobState = "available"
RiverJobState_Cancelled RiverJobState = "cancelled"
RiverJobState_Completed RiverJobState = "completed"
RiverJobState_Discarded RiverJobState = "discarded"
RiverJobState_Pending RiverJobState = "pending"
RiverJobState_Retryable RiverJobState = "retryable"
RiverJobState_Running RiverJobState = "running"
RiverJobState_Scheduled RiverJobState = "scheduled"
)
var RiverJobStateAllValues = []RiverJobState{
RiverJobState_Available,
RiverJobState_Cancelled,
RiverJobState_Completed,
RiverJobState_Discarded,
RiverJobState_Pending,
RiverJobState_Retryable,
RiverJobState_Running,
RiverJobState_Scheduled,
}
func (e *RiverJobState) Scan(value interface{}) error {
var enumValue string
switch val := value.(type) {
case string:
enumValue = val
case []byte:
enumValue = string(val)
default:
return errors.New("jet: Invalid scan value for AllTypesEnum enum. Enum value has to be of type string or []byte")
}
switch enumValue {
case "available":
*e = RiverJobState_Available
case "cancelled":
*e = RiverJobState_Cancelled
case "completed":
*e = RiverJobState_Completed
case "discarded":
*e = RiverJobState_Discarded
case "pending":
*e = RiverJobState_Pending
case "retryable":
*e = RiverJobState_Retryable
case "running":
*e = RiverJobState_Running
case "scheduled":
*e = RiverJobState_Scheduled
default:
return errors.New("jet: Invalid scan value '" + enumValue + "' for RiverJobState enum")
}
return nil
}
func (e RiverJobState) String() string {
return string(e)
}

View File

@@ -0,0 +1,22 @@
//
// 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 (
"time"
)
type Storages struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
IsDefault bool `json:"is_default"`
Name string `json:"name"`
Type int16 `json:"type"`
Config string `json:"config"`
}

View File

@@ -0,0 +1,21 @@
//
// 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 (
"time"
)
type TenantUserBalances struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
Balance int64 `json:"balance"`
}

View File

@@ -0,0 +1,23 @@
//
// 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 (
"time"
)
type TenantUsers struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
Status int16 `json:"status"`
Role int16 `json:"role"`
}

View File

@@ -0,0 +1,23 @@
//
// 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 (
"time"
)
type Tenants struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiredAt time.Time `json:"expired_at"`
CreatedByUserID int64 `json:"created_by_user_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description *string `json:"description"`
}

View File

@@ -0,0 +1,24 @@
//
// 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 (
"time"
)
type UserBoughtPosts struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
PostID int64 `json:"post_id"`
Price int64 `json:"price"`
Discount int16 `json:"discount"`
Meta *string `json:"meta"`
}

View File

@@ -0,0 +1,21 @@
//
// 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 (
"time"
)
type UserMedias struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
TenantID int64 `json:"tenant_id"`
UserID int64 `json:"user_id"`
MediaID int64 `json:"media_id"`
}

View File

@@ -0,0 +1,27 @@
//
// 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 (
"time"
)
type UserOauths struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
Channel int16 `json:"channel"`
UserID int64 `json:"user_id"`
UnionID *string `json:"union_id"`
OpenID string `json:"open_id"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpireAt time.Time `json:"expire_at"`
Meta *string `json:"meta"`
}

View File

@@ -0,0 +1,28 @@
//
// 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 (
"time"
)
type Users struct {
ID int64 `sql:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
Status int16 `json:"status"`
Email string `json:"email"`
Phone string `json:"phone"`
Username string `json:"username"`
Nickname *string `json:"nickname"`
Password string `json:"password"`
Age int16 `json:"age"`
Sex int16 `json:"sex"`
Avatar *string `json:"avatar"`
}