feat: init repo
This commit is contained in:
0
backend/database/models/.gitkeep
Normal file
0
backend/database/models/.gitkeep
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// 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 enum
|
||||
|
||||
import "github.com/go-jet/jet/v2/postgres"
|
||||
|
||||
var RiverJobState = &struct {
|
||||
Available postgres.StringExpression
|
||||
Cancelled postgres.StringExpression
|
||||
Completed postgres.StringExpression
|
||||
Discarded postgres.StringExpression
|
||||
Pending postgres.StringExpression
|
||||
Retryable postgres.StringExpression
|
||||
Running postgres.StringExpression
|
||||
Scheduled postgres.StringExpression
|
||||
}{
|
||||
Available: postgres.NewEnumValue("available"),
|
||||
Cancelled: postgres.NewEnumValue("cancelled"),
|
||||
Completed: postgres.NewEnumValue("completed"),
|
||||
Discarded: postgres.NewEnumValue("discarded"),
|
||||
Pending: postgres.NewEnumValue("pending"),
|
||||
Retryable: postgres.NewEnumValue("retryable"),
|
||||
Running: postgres.NewEnumValue("running"),
|
||||
Scheduled: postgres.NewEnumValue("scheduled"),
|
||||
}
|
||||
31
backend/database/models/qvyun_v2/public/model/orders.go
Normal file
31
backend/database/models/qvyun_v2/public/model/orders.go
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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"`
|
||||
Description *string `json:"description"`
|
||||
Meta *string `json:"meta"`
|
||||
}
|
||||
34
backend/database/models/qvyun_v2/public/model/posts.go
Normal file
34
backend/database/models/qvyun_v2/public/model/posts.go
Normal 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"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
HashID string `json:"hash_id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Poster string `json:"poster"`
|
||||
Content string `json:"content"`
|
||||
Stage int16 `json:"stage"`
|
||||
Status int16 `json:"status"`
|
||||
Price int64 `json:"price"`
|
||||
Discount int16 `json:"discount"`
|
||||
Views int64 `json:"views"`
|
||||
Likes int64 `json:"likes"`
|
||||
Meta *string `json:"meta"`
|
||||
Assets *string `json:"assets"`
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
23
backend/database/models/qvyun_v2/public/model/tenants.go
Normal file
23
backend/database/models/qvyun_v2/public/model/tenants.go
Normal 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"`
|
||||
}
|
||||
28
backend/database/models/qvyun_v2/public/model/user_oauths.go
Normal file
28
backend/database/models/qvyun_v2/public/model/user_oauths.go
Normal 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 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"`
|
||||
AccessKey string `json:"access_key"`
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
ExpireAt time.Time `json:"expire_at"`
|
||||
Meta *string `json:"meta"`
|
||||
}
|
||||
28
backend/database/models/qvyun_v2/public/model/users.go
Normal file
28
backend/database/models/qvyun_v2/public/model/users.go
Normal 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"`
|
||||
}
|
||||
84
backend/database/models/qvyun_v2/public/table/migrations.go
Normal file
84
backend/database/models/qvyun_v2/public/table/migrations.go
Normal file
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var Migrations = newMigrationsTable("public", "migrations", "")
|
||||
|
||||
type migrationsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
VersionID postgres.ColumnInteger
|
||||
IsApplied postgres.ColumnBool
|
||||
Tstamp postgres.ColumnTimestamp
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type MigrationsTable struct {
|
||||
migrationsTable
|
||||
|
||||
EXCLUDED migrationsTable
|
||||
}
|
||||
|
||||
// AS creates new MigrationsTable with assigned alias
|
||||
func (a MigrationsTable) AS(alias string) *MigrationsTable {
|
||||
return newMigrationsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new MigrationsTable with assigned schema name
|
||||
func (a MigrationsTable) FromSchema(schemaName string) *MigrationsTable {
|
||||
return newMigrationsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new MigrationsTable with assigned table prefix
|
||||
func (a MigrationsTable) WithPrefix(prefix string) *MigrationsTable {
|
||||
return newMigrationsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new MigrationsTable with assigned table suffix
|
||||
func (a MigrationsTable) WithSuffix(suffix string) *MigrationsTable {
|
||||
return newMigrationsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newMigrationsTable(schemaName, tableName, alias string) *MigrationsTable {
|
||||
return &MigrationsTable{
|
||||
migrationsTable: newMigrationsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newMigrationsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newMigrationsTableImpl(schemaName, tableName, alias string) migrationsTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
VersionIDColumn = postgres.IntegerColumn("version_id")
|
||||
IsAppliedColumn = postgres.BoolColumn("is_applied")
|
||||
TstampColumn = postgres.TimestampColumn("tstamp")
|
||||
allColumns = postgres.ColumnList{IDColumn, VersionIDColumn, IsAppliedColumn, TstampColumn}
|
||||
mutableColumns = postgres.ColumnList{VersionIDColumn, IsAppliedColumn, TstampColumn}
|
||||
)
|
||||
|
||||
return migrationsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
VersionID: VersionIDColumn,
|
||||
IsApplied: IsAppliedColumn,
|
||||
Tstamp: TstampColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
120
backend/database/models/qvyun_v2/public/table/orders.go
Normal file
120
backend/database/models/qvyun_v2/public/table/orders.go
Normal file
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var Orders = newOrdersTable("public", "orders", "")
|
||||
|
||||
type ordersTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
DeletedAt postgres.ColumnTimestamp
|
||||
TenantID postgres.ColumnInteger
|
||||
UserID postgres.ColumnInteger
|
||||
Type postgres.ColumnInteger
|
||||
Status postgres.ColumnInteger
|
||||
OrderSerial postgres.ColumnString
|
||||
RemoteOrderSerial postgres.ColumnString
|
||||
RefundSerial postgres.ColumnString
|
||||
RemoteRefundSerial postgres.ColumnString
|
||||
Amount postgres.ColumnInteger
|
||||
Currency postgres.ColumnString
|
||||
Description postgres.ColumnString
|
||||
Meta postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type OrdersTable struct {
|
||||
ordersTable
|
||||
|
||||
EXCLUDED ordersTable
|
||||
}
|
||||
|
||||
// AS creates new OrdersTable with assigned alias
|
||||
func (a OrdersTable) AS(alias string) *OrdersTable {
|
||||
return newOrdersTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new OrdersTable with assigned schema name
|
||||
func (a OrdersTable) FromSchema(schemaName string) *OrdersTable {
|
||||
return newOrdersTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new OrdersTable with assigned table prefix
|
||||
func (a OrdersTable) WithPrefix(prefix string) *OrdersTable {
|
||||
return newOrdersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new OrdersTable with assigned table suffix
|
||||
func (a OrdersTable) WithSuffix(suffix string) *OrdersTable {
|
||||
return newOrdersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newOrdersTable(schemaName, tableName, alias string) *OrdersTable {
|
||||
return &OrdersTable{
|
||||
ordersTable: newOrdersTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newOrdersTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newOrdersTableImpl(schemaName, tableName, alias string) ordersTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
|
||||
TenantIDColumn = postgres.IntegerColumn("tenant_id")
|
||||
UserIDColumn = postgres.IntegerColumn("user_id")
|
||||
TypeColumn = postgres.IntegerColumn("type")
|
||||
StatusColumn = postgres.IntegerColumn("status")
|
||||
OrderSerialColumn = postgres.StringColumn("order_serial")
|
||||
RemoteOrderSerialColumn = postgres.StringColumn("remote_order_serial")
|
||||
RefundSerialColumn = postgres.StringColumn("refund_serial")
|
||||
RemoteRefundSerialColumn = postgres.StringColumn("remote_refund_serial")
|
||||
AmountColumn = postgres.IntegerColumn("amount")
|
||||
CurrencyColumn = postgres.StringColumn("currency")
|
||||
DescriptionColumn = postgres.StringColumn("description")
|
||||
MetaColumn = postgres.StringColumn("meta")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, TypeColumn, StatusColumn, OrderSerialColumn, RemoteOrderSerialColumn, RefundSerialColumn, RemoteRefundSerialColumn, AmountColumn, CurrencyColumn, DescriptionColumn, MetaColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, TypeColumn, StatusColumn, OrderSerialColumn, RemoteOrderSerialColumn, RefundSerialColumn, RemoteRefundSerialColumn, AmountColumn, CurrencyColumn, DescriptionColumn, MetaColumn}
|
||||
)
|
||||
|
||||
return ordersTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
DeletedAt: DeletedAtColumn,
|
||||
TenantID: TenantIDColumn,
|
||||
UserID: UserIDColumn,
|
||||
Type: TypeColumn,
|
||||
Status: StatusColumn,
|
||||
OrderSerial: OrderSerialColumn,
|
||||
RemoteOrderSerial: RemoteOrderSerialColumn,
|
||||
RefundSerial: RefundSerialColumn,
|
||||
RemoteRefundSerial: RemoteRefundSerialColumn,
|
||||
Amount: AmountColumn,
|
||||
Currency: CurrencyColumn,
|
||||
Description: DescriptionColumn,
|
||||
Meta: MetaColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
129
backend/database/models/qvyun_v2/public/table/posts.go
Normal file
129
backend/database/models/qvyun_v2/public/table/posts.go
Normal file
@@ -0,0 +1,129 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var Posts = newPostsTable("public", "posts", "")
|
||||
|
||||
type postsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
DeletedAt postgres.ColumnTimestamp
|
||||
TenantID postgres.ColumnInteger
|
||||
UserID postgres.ColumnInteger
|
||||
HashID postgres.ColumnString
|
||||
Title postgres.ColumnString
|
||||
Description postgres.ColumnString
|
||||
Poster postgres.ColumnString
|
||||
Content postgres.ColumnString
|
||||
Stage postgres.ColumnInteger
|
||||
Status postgres.ColumnInteger
|
||||
Price postgres.ColumnInteger
|
||||
Discount postgres.ColumnInteger
|
||||
Views postgres.ColumnInteger
|
||||
Likes postgres.ColumnInteger
|
||||
Meta postgres.ColumnString
|
||||
Assets postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type PostsTable struct {
|
||||
postsTable
|
||||
|
||||
EXCLUDED postsTable
|
||||
}
|
||||
|
||||
// AS creates new PostsTable with assigned alias
|
||||
func (a PostsTable) AS(alias string) *PostsTable {
|
||||
return newPostsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new PostsTable with assigned schema name
|
||||
func (a PostsTable) FromSchema(schemaName string) *PostsTable {
|
||||
return newPostsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new PostsTable with assigned table prefix
|
||||
func (a PostsTable) WithPrefix(prefix string) *PostsTable {
|
||||
return newPostsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new PostsTable with assigned table suffix
|
||||
func (a PostsTable) WithSuffix(suffix string) *PostsTable {
|
||||
return newPostsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newPostsTable(schemaName, tableName, alias string) *PostsTable {
|
||||
return &PostsTable{
|
||||
postsTable: newPostsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newPostsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newPostsTableImpl(schemaName, tableName, alias string) postsTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
|
||||
TenantIDColumn = postgres.IntegerColumn("tenant_id")
|
||||
UserIDColumn = postgres.IntegerColumn("user_id")
|
||||
HashIDColumn = postgres.StringColumn("hash_id")
|
||||
TitleColumn = postgres.StringColumn("title")
|
||||
DescriptionColumn = postgres.StringColumn("description")
|
||||
PosterColumn = postgres.StringColumn("poster")
|
||||
ContentColumn = postgres.StringColumn("content")
|
||||
StageColumn = postgres.IntegerColumn("stage")
|
||||
StatusColumn = postgres.IntegerColumn("status")
|
||||
PriceColumn = postgres.IntegerColumn("price")
|
||||
DiscountColumn = postgres.IntegerColumn("discount")
|
||||
ViewsColumn = postgres.IntegerColumn("views")
|
||||
LikesColumn = postgres.IntegerColumn("likes")
|
||||
MetaColumn = postgres.StringColumn("meta")
|
||||
AssetsColumn = postgres.StringColumn("assets")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, HashIDColumn, TitleColumn, DescriptionColumn, PosterColumn, ContentColumn, StageColumn, StatusColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, MetaColumn, AssetsColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, HashIDColumn, TitleColumn, DescriptionColumn, PosterColumn, ContentColumn, StageColumn, StatusColumn, PriceColumn, DiscountColumn, ViewsColumn, LikesColumn, MetaColumn, AssetsColumn}
|
||||
)
|
||||
|
||||
return postsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
DeletedAt: DeletedAtColumn,
|
||||
TenantID: TenantIDColumn,
|
||||
UserID: UserIDColumn,
|
||||
HashID: HashIDColumn,
|
||||
Title: TitleColumn,
|
||||
Description: DescriptionColumn,
|
||||
Poster: PosterColumn,
|
||||
Content: ContentColumn,
|
||||
Stage: StageColumn,
|
||||
Status: StatusColumn,
|
||||
Price: PriceColumn,
|
||||
Discount: DiscountColumn,
|
||||
Views: ViewsColumn,
|
||||
Likes: LikesColumn,
|
||||
Meta: MetaColumn,
|
||||
Assets: AssetsColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var RiverClient = newRiverClientTable("public", "river_client", "")
|
||||
|
||||
type riverClientTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
Metadata postgres.ColumnString
|
||||
PausedAt postgres.ColumnTimestampz
|
||||
UpdatedAt postgres.ColumnTimestampz
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverClientTable struct {
|
||||
riverClientTable
|
||||
|
||||
EXCLUDED riverClientTable
|
||||
}
|
||||
|
||||
// AS creates new RiverClientTable with assigned alias
|
||||
func (a RiverClientTable) AS(alias string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverClientTable with assigned schema name
|
||||
func (a RiverClientTable) FromSchema(schemaName string) *RiverClientTable {
|
||||
return newRiverClientTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverClientTable with assigned table prefix
|
||||
func (a RiverClientTable) WithPrefix(prefix string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverClientTable with assigned table suffix
|
||||
func (a RiverClientTable) WithSuffix(suffix string) *RiverClientTable {
|
||||
return newRiverClientTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverClientTable(schemaName, tableName, alias string) *RiverClientTable {
|
||||
return &RiverClientTable{
|
||||
riverClientTable: newRiverClientTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverClientTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverClientTableImpl(schemaName, tableName, alias string) riverClientTable {
|
||||
var (
|
||||
IDColumn = postgres.StringColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
MetadataColumn = postgres.StringColumn("metadata")
|
||||
PausedAtColumn = postgres.TimestampzColumn("paused_at")
|
||||
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
)
|
||||
|
||||
return riverClientTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
Metadata: MetadataColumn,
|
||||
PausedAt: PausedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var RiverClientQueue = newRiverClientQueueTable("public", "river_client_queue", "")
|
||||
|
||||
type riverClientQueueTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
RiverClientID postgres.ColumnString
|
||||
Name postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
MaxWorkers postgres.ColumnInteger
|
||||
Metadata postgres.ColumnString
|
||||
NumJobsCompleted postgres.ColumnInteger
|
||||
NumJobsRunning postgres.ColumnInteger
|
||||
UpdatedAt postgres.ColumnTimestampz
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverClientQueueTable struct {
|
||||
riverClientQueueTable
|
||||
|
||||
EXCLUDED riverClientQueueTable
|
||||
}
|
||||
|
||||
// AS creates new RiverClientQueueTable with assigned alias
|
||||
func (a RiverClientQueueTable) AS(alias string) *RiverClientQueueTable {
|
||||
return newRiverClientQueueTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverClientQueueTable with assigned schema name
|
||||
func (a RiverClientQueueTable) FromSchema(schemaName string) *RiverClientQueueTable {
|
||||
return newRiverClientQueueTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverClientQueueTable with assigned table prefix
|
||||
func (a RiverClientQueueTable) WithPrefix(prefix string) *RiverClientQueueTable {
|
||||
return newRiverClientQueueTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverClientQueueTable with assigned table suffix
|
||||
func (a RiverClientQueueTable) WithSuffix(suffix string) *RiverClientQueueTable {
|
||||
return newRiverClientQueueTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverClientQueueTable(schemaName, tableName, alias string) *RiverClientQueueTable {
|
||||
return &RiverClientQueueTable{
|
||||
riverClientQueueTable: newRiverClientQueueTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverClientQueueTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverClientQueueTableImpl(schemaName, tableName, alias string) riverClientQueueTable {
|
||||
var (
|
||||
RiverClientIDColumn = postgres.StringColumn("river_client_id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
MaxWorkersColumn = postgres.IntegerColumn("max_workers")
|
||||
MetadataColumn = postgres.StringColumn("metadata")
|
||||
NumJobsCompletedColumn = postgres.IntegerColumn("num_jobs_completed")
|
||||
NumJobsRunningColumn = postgres.IntegerColumn("num_jobs_running")
|
||||
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
|
||||
allColumns = postgres.ColumnList{RiverClientIDColumn, NameColumn, CreatedAtColumn, MaxWorkersColumn, MetadataColumn, NumJobsCompletedColumn, NumJobsRunningColumn, UpdatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, MaxWorkersColumn, MetadataColumn, NumJobsCompletedColumn, NumJobsRunningColumn, UpdatedAtColumn}
|
||||
)
|
||||
|
||||
return riverClientQueueTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
RiverClientID: RiverClientIDColumn,
|
||||
Name: NameColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
MaxWorkers: MaxWorkersColumn,
|
||||
Metadata: MetadataColumn,
|
||||
NumJobsCompleted: NumJobsCompletedColumn,
|
||||
NumJobsRunning: NumJobsRunningColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
126
backend/database/models/qvyun_v2/public/table/river_job.go
Normal file
126
backend/database/models/qvyun_v2/public/table/river_job.go
Normal file
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var RiverJob = newRiverJobTable("public", "river_job", "")
|
||||
|
||||
type riverJobTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
State postgres.ColumnString
|
||||
Attempt postgres.ColumnInteger
|
||||
MaxAttempts postgres.ColumnInteger
|
||||
AttemptedAt postgres.ColumnTimestampz
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
FinalizedAt postgres.ColumnTimestampz
|
||||
ScheduledAt postgres.ColumnTimestampz
|
||||
Priority postgres.ColumnInteger
|
||||
Args postgres.ColumnString
|
||||
AttemptedBy postgres.ColumnString
|
||||
Errors postgres.ColumnString
|
||||
Kind postgres.ColumnString
|
||||
Metadata postgres.ColumnString
|
||||
Queue postgres.ColumnString
|
||||
Tags postgres.ColumnString
|
||||
UniqueKey postgres.ColumnString
|
||||
UniqueStates postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverJobTable struct {
|
||||
riverJobTable
|
||||
|
||||
EXCLUDED riverJobTable
|
||||
}
|
||||
|
||||
// AS creates new RiverJobTable with assigned alias
|
||||
func (a RiverJobTable) AS(alias string) *RiverJobTable {
|
||||
return newRiverJobTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverJobTable with assigned schema name
|
||||
func (a RiverJobTable) FromSchema(schemaName string) *RiverJobTable {
|
||||
return newRiverJobTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverJobTable with assigned table prefix
|
||||
func (a RiverJobTable) WithPrefix(prefix string) *RiverJobTable {
|
||||
return newRiverJobTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverJobTable with assigned table suffix
|
||||
func (a RiverJobTable) WithSuffix(suffix string) *RiverJobTable {
|
||||
return newRiverJobTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverJobTable(schemaName, tableName, alias string) *RiverJobTable {
|
||||
return &RiverJobTable{
|
||||
riverJobTable: newRiverJobTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverJobTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverJobTableImpl(schemaName, tableName, alias string) riverJobTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
StateColumn = postgres.StringColumn("state")
|
||||
AttemptColumn = postgres.IntegerColumn("attempt")
|
||||
MaxAttemptsColumn = postgres.IntegerColumn("max_attempts")
|
||||
AttemptedAtColumn = postgres.TimestampzColumn("attempted_at")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
FinalizedAtColumn = postgres.TimestampzColumn("finalized_at")
|
||||
ScheduledAtColumn = postgres.TimestampzColumn("scheduled_at")
|
||||
PriorityColumn = postgres.IntegerColumn("priority")
|
||||
ArgsColumn = postgres.StringColumn("args")
|
||||
AttemptedByColumn = postgres.StringColumn("attempted_by")
|
||||
ErrorsColumn = postgres.StringColumn("errors")
|
||||
KindColumn = postgres.StringColumn("kind")
|
||||
MetadataColumn = postgres.StringColumn("metadata")
|
||||
QueueColumn = postgres.StringColumn("queue")
|
||||
TagsColumn = postgres.StringColumn("tags")
|
||||
UniqueKeyColumn = postgres.StringColumn("unique_key")
|
||||
UniqueStatesColumn = postgres.StringColumn("unique_states")
|
||||
allColumns = postgres.ColumnList{IDColumn, StateColumn, AttemptColumn, MaxAttemptsColumn, AttemptedAtColumn, CreatedAtColumn, FinalizedAtColumn, ScheduledAtColumn, PriorityColumn, ArgsColumn, AttemptedByColumn, ErrorsColumn, KindColumn, MetadataColumn, QueueColumn, TagsColumn, UniqueKeyColumn, UniqueStatesColumn}
|
||||
mutableColumns = postgres.ColumnList{StateColumn, AttemptColumn, MaxAttemptsColumn, AttemptedAtColumn, CreatedAtColumn, FinalizedAtColumn, ScheduledAtColumn, PriorityColumn, ArgsColumn, AttemptedByColumn, ErrorsColumn, KindColumn, MetadataColumn, QueueColumn, TagsColumn, UniqueKeyColumn, UniqueStatesColumn}
|
||||
)
|
||||
|
||||
return riverJobTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
State: StateColumn,
|
||||
Attempt: AttemptColumn,
|
||||
MaxAttempts: MaxAttemptsColumn,
|
||||
AttemptedAt: AttemptedAtColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
FinalizedAt: FinalizedAtColumn,
|
||||
ScheduledAt: ScheduledAtColumn,
|
||||
Priority: PriorityColumn,
|
||||
Args: ArgsColumn,
|
||||
AttemptedBy: AttemptedByColumn,
|
||||
Errors: ErrorsColumn,
|
||||
Kind: KindColumn,
|
||||
Metadata: MetadataColumn,
|
||||
Queue: QueueColumn,
|
||||
Tags: TagsColumn,
|
||||
UniqueKey: UniqueKeyColumn,
|
||||
UniqueStates: UniqueStatesColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var RiverLeader = newRiverLeaderTable("public", "river_leader", "")
|
||||
|
||||
type riverLeaderTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ElectedAt postgres.ColumnTimestampz
|
||||
ExpiresAt postgres.ColumnTimestampz
|
||||
LeaderID postgres.ColumnString
|
||||
Name postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverLeaderTable struct {
|
||||
riverLeaderTable
|
||||
|
||||
EXCLUDED riverLeaderTable
|
||||
}
|
||||
|
||||
// AS creates new RiverLeaderTable with assigned alias
|
||||
func (a RiverLeaderTable) AS(alias string) *RiverLeaderTable {
|
||||
return newRiverLeaderTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverLeaderTable with assigned schema name
|
||||
func (a RiverLeaderTable) FromSchema(schemaName string) *RiverLeaderTable {
|
||||
return newRiverLeaderTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverLeaderTable with assigned table prefix
|
||||
func (a RiverLeaderTable) WithPrefix(prefix string) *RiverLeaderTable {
|
||||
return newRiverLeaderTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverLeaderTable with assigned table suffix
|
||||
func (a RiverLeaderTable) WithSuffix(suffix string) *RiverLeaderTable {
|
||||
return newRiverLeaderTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverLeaderTable(schemaName, tableName, alias string) *RiverLeaderTable {
|
||||
return &RiverLeaderTable{
|
||||
riverLeaderTable: newRiverLeaderTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverLeaderTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverLeaderTableImpl(schemaName, tableName, alias string) riverLeaderTable {
|
||||
var (
|
||||
ElectedAtColumn = postgres.TimestampzColumn("elected_at")
|
||||
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
|
||||
LeaderIDColumn = postgres.StringColumn("leader_id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
allColumns = postgres.ColumnList{ElectedAtColumn, ExpiresAtColumn, LeaderIDColumn, NameColumn}
|
||||
mutableColumns = postgres.ColumnList{ElectedAtColumn, ExpiresAtColumn, LeaderIDColumn}
|
||||
)
|
||||
|
||||
return riverLeaderTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ElectedAt: ElectedAtColumn,
|
||||
ExpiresAt: ExpiresAtColumn,
|
||||
LeaderID: LeaderIDColumn,
|
||||
Name: NameColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
87
backend/database/models/qvyun_v2/public/table/river_queue.go
Normal file
87
backend/database/models/qvyun_v2/public/table/river_queue.go
Normal file
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var RiverQueue = newRiverQueueTable("public", "river_queue", "")
|
||||
|
||||
type riverQueueTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
Name postgres.ColumnString
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
Metadata postgres.ColumnString
|
||||
PausedAt postgres.ColumnTimestampz
|
||||
UpdatedAt postgres.ColumnTimestampz
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type RiverQueueTable struct {
|
||||
riverQueueTable
|
||||
|
||||
EXCLUDED riverQueueTable
|
||||
}
|
||||
|
||||
// AS creates new RiverQueueTable with assigned alias
|
||||
func (a RiverQueueTable) AS(alias string) *RiverQueueTable {
|
||||
return newRiverQueueTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new RiverQueueTable with assigned schema name
|
||||
func (a RiverQueueTable) FromSchema(schemaName string) *RiverQueueTable {
|
||||
return newRiverQueueTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new RiverQueueTable with assigned table prefix
|
||||
func (a RiverQueueTable) WithPrefix(prefix string) *RiverQueueTable {
|
||||
return newRiverQueueTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new RiverQueueTable with assigned table suffix
|
||||
func (a RiverQueueTable) WithSuffix(suffix string) *RiverQueueTable {
|
||||
return newRiverQueueTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newRiverQueueTable(schemaName, tableName, alias string) *RiverQueueTable {
|
||||
return &RiverQueueTable{
|
||||
riverQueueTable: newRiverQueueTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newRiverQueueTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newRiverQueueTableImpl(schemaName, tableName, alias string) riverQueueTable {
|
||||
var (
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
MetadataColumn = postgres.StringColumn("metadata")
|
||||
PausedAtColumn = postgres.TimestampzColumn("paused_at")
|
||||
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
|
||||
allColumns = postgres.ColumnList{NameColumn, CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, MetadataColumn, PausedAtColumn, UpdatedAtColumn}
|
||||
)
|
||||
|
||||
return riverQueueTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
Name: NameColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
Metadata: MetadataColumn,
|
||||
PausedAt: PausedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
// UseSchema sets a new schema name for all generated table SQL builder types. It is recommended to invoke
|
||||
// this method only once at the beginning of the program.
|
||||
func UseSchema(schema string) {
|
||||
Migrations = Migrations.FromSchema(schema)
|
||||
Orders = Orders.FromSchema(schema)
|
||||
Posts = Posts.FromSchema(schema)
|
||||
RiverClient = RiverClient.FromSchema(schema)
|
||||
RiverClientQueue = RiverClientQueue.FromSchema(schema)
|
||||
RiverJob = RiverJob.FromSchema(schema)
|
||||
RiverLeader = RiverLeader.FromSchema(schema)
|
||||
RiverQueue = RiverQueue.FromSchema(schema)
|
||||
TenantUserBalances = TenantUserBalances.FromSchema(schema)
|
||||
TenantUsers = TenantUsers.FromSchema(schema)
|
||||
Tenants = Tenants.FromSchema(schema)
|
||||
UserOauths = UserOauths.FromSchema(schema)
|
||||
Users = Users.FromSchema(schema)
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var TenantUserBalances = newTenantUserBalancesTable("public", "tenant_user_balances", "")
|
||||
|
||||
type tenantUserBalancesTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
TenantID postgres.ColumnInteger
|
||||
UserID postgres.ColumnInteger
|
||||
Balance postgres.ColumnInteger
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type TenantUserBalancesTable struct {
|
||||
tenantUserBalancesTable
|
||||
|
||||
EXCLUDED tenantUserBalancesTable
|
||||
}
|
||||
|
||||
// AS creates new TenantUserBalancesTable with assigned alias
|
||||
func (a TenantUserBalancesTable) AS(alias string) *TenantUserBalancesTable {
|
||||
return newTenantUserBalancesTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new TenantUserBalancesTable with assigned schema name
|
||||
func (a TenantUserBalancesTable) FromSchema(schemaName string) *TenantUserBalancesTable {
|
||||
return newTenantUserBalancesTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new TenantUserBalancesTable with assigned table prefix
|
||||
func (a TenantUserBalancesTable) WithPrefix(prefix string) *TenantUserBalancesTable {
|
||||
return newTenantUserBalancesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new TenantUserBalancesTable with assigned table suffix
|
||||
func (a TenantUserBalancesTable) WithSuffix(suffix string) *TenantUserBalancesTable {
|
||||
return newTenantUserBalancesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newTenantUserBalancesTable(schemaName, tableName, alias string) *TenantUserBalancesTable {
|
||||
return &TenantUserBalancesTable{
|
||||
tenantUserBalancesTable: newTenantUserBalancesTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newTenantUserBalancesTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newTenantUserBalancesTableImpl(schemaName, tableName, alias string) tenantUserBalancesTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
TenantIDColumn = postgres.IntegerColumn("tenant_id")
|
||||
UserIDColumn = postgres.IntegerColumn("user_id")
|
||||
BalanceColumn = postgres.IntegerColumn("balance")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, TenantIDColumn, UserIDColumn, BalanceColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, TenantIDColumn, UserIDColumn, BalanceColumn}
|
||||
)
|
||||
|
||||
return tenantUserBalancesTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
TenantID: TenantIDColumn,
|
||||
UserID: UserIDColumn,
|
||||
Balance: BalanceColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var TenantUsers = newTenantUsersTable("public", "tenant_users", "")
|
||||
|
||||
type tenantUsersTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
DeletedAt postgres.ColumnTimestamp
|
||||
TenantID postgres.ColumnInteger
|
||||
UserID postgres.ColumnInteger
|
||||
Status postgres.ColumnInteger
|
||||
Role postgres.ColumnInteger
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type TenantUsersTable struct {
|
||||
tenantUsersTable
|
||||
|
||||
EXCLUDED tenantUsersTable
|
||||
}
|
||||
|
||||
// AS creates new TenantUsersTable with assigned alias
|
||||
func (a TenantUsersTable) AS(alias string) *TenantUsersTable {
|
||||
return newTenantUsersTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new TenantUsersTable with assigned schema name
|
||||
func (a TenantUsersTable) FromSchema(schemaName string) *TenantUsersTable {
|
||||
return newTenantUsersTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new TenantUsersTable with assigned table prefix
|
||||
func (a TenantUsersTable) WithPrefix(prefix string) *TenantUsersTable {
|
||||
return newTenantUsersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new TenantUsersTable with assigned table suffix
|
||||
func (a TenantUsersTable) WithSuffix(suffix string) *TenantUsersTable {
|
||||
return newTenantUsersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newTenantUsersTable(schemaName, tableName, alias string) *TenantUsersTable {
|
||||
return &TenantUsersTable{
|
||||
tenantUsersTable: newTenantUsersTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newTenantUsersTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newTenantUsersTableImpl(schemaName, tableName, alias string) tenantUsersTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
|
||||
TenantIDColumn = postgres.IntegerColumn("tenant_id")
|
||||
UserIDColumn = postgres.IntegerColumn("user_id")
|
||||
StatusColumn = postgres.IntegerColumn("status")
|
||||
RoleColumn = postgres.IntegerColumn("role")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, StatusColumn, RoleColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, TenantIDColumn, UserIDColumn, StatusColumn, RoleColumn}
|
||||
)
|
||||
|
||||
return tenantUsersTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
DeletedAt: DeletedAtColumn,
|
||||
TenantID: TenantIDColumn,
|
||||
UserID: UserIDColumn,
|
||||
Status: StatusColumn,
|
||||
Role: RoleColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
96
backend/database/models/qvyun_v2/public/table/tenants.go
Normal file
96
backend/database/models/qvyun_v2/public/table/tenants.go
Normal file
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var Tenants = newTenantsTable("public", "tenants", "")
|
||||
|
||||
type tenantsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
ExpiredAt postgres.ColumnTimestamp
|
||||
CreatedByUserID postgres.ColumnInteger
|
||||
Name postgres.ColumnString
|
||||
Slug postgres.ColumnString
|
||||
Description postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type TenantsTable struct {
|
||||
tenantsTable
|
||||
|
||||
EXCLUDED tenantsTable
|
||||
}
|
||||
|
||||
// AS creates new TenantsTable with assigned alias
|
||||
func (a TenantsTable) AS(alias string) *TenantsTable {
|
||||
return newTenantsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new TenantsTable with assigned schema name
|
||||
func (a TenantsTable) FromSchema(schemaName string) *TenantsTable {
|
||||
return newTenantsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new TenantsTable with assigned table prefix
|
||||
func (a TenantsTable) WithPrefix(prefix string) *TenantsTable {
|
||||
return newTenantsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new TenantsTable with assigned table suffix
|
||||
func (a TenantsTable) WithSuffix(suffix string) *TenantsTable {
|
||||
return newTenantsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newTenantsTable(schemaName, tableName, alias string) *TenantsTable {
|
||||
return &TenantsTable{
|
||||
tenantsTable: newTenantsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newTenantsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newTenantsTableImpl(schemaName, tableName, alias string) tenantsTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
ExpiredAtColumn = postgres.TimestampColumn("expired_at")
|
||||
CreatedByUserIDColumn = postgres.IntegerColumn("created_by_user_id")
|
||||
NameColumn = postgres.StringColumn("name")
|
||||
SlugColumn = postgres.StringColumn("slug")
|
||||
DescriptionColumn = postgres.StringColumn("description")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, ExpiredAtColumn, CreatedByUserIDColumn, NameColumn, SlugColumn, DescriptionColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, ExpiredAtColumn, CreatedByUserIDColumn, NameColumn, SlugColumn, DescriptionColumn}
|
||||
)
|
||||
|
||||
return tenantsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
ExpiredAt: ExpiredAtColumn,
|
||||
CreatedByUserID: CreatedByUserIDColumn,
|
||||
Name: NameColumn,
|
||||
Slug: SlugColumn,
|
||||
Description: DescriptionColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
111
backend/database/models/qvyun_v2/public/table/user_oauths.go
Normal file
111
backend/database/models/qvyun_v2/public/table/user_oauths.go
Normal file
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var UserOauths = newUserOauthsTable("public", "user_oauths", "")
|
||||
|
||||
type userOauthsTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
DeletedAt postgres.ColumnTimestamp
|
||||
Channel postgres.ColumnInteger
|
||||
UserID postgres.ColumnInteger
|
||||
UnionID postgres.ColumnString
|
||||
OpenID postgres.ColumnString
|
||||
AccessKey postgres.ColumnString
|
||||
AccessToken postgres.ColumnString
|
||||
RefreshToken postgres.ColumnString
|
||||
ExpireAt postgres.ColumnTimestamp
|
||||
Meta postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type UserOauthsTable struct {
|
||||
userOauthsTable
|
||||
|
||||
EXCLUDED userOauthsTable
|
||||
}
|
||||
|
||||
// AS creates new UserOauthsTable with assigned alias
|
||||
func (a UserOauthsTable) AS(alias string) *UserOauthsTable {
|
||||
return newUserOauthsTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new UserOauthsTable with assigned schema name
|
||||
func (a UserOauthsTable) FromSchema(schemaName string) *UserOauthsTable {
|
||||
return newUserOauthsTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new UserOauthsTable with assigned table prefix
|
||||
func (a UserOauthsTable) WithPrefix(prefix string) *UserOauthsTable {
|
||||
return newUserOauthsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new UserOauthsTable with assigned table suffix
|
||||
func (a UserOauthsTable) WithSuffix(suffix string) *UserOauthsTable {
|
||||
return newUserOauthsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newUserOauthsTable(schemaName, tableName, alias string) *UserOauthsTable {
|
||||
return &UserOauthsTable{
|
||||
userOauthsTable: newUserOauthsTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newUserOauthsTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newUserOauthsTableImpl(schemaName, tableName, alias string) userOauthsTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
|
||||
ChannelColumn = postgres.IntegerColumn("channel")
|
||||
UserIDColumn = postgres.IntegerColumn("user_id")
|
||||
UnionIDColumn = postgres.StringColumn("union_id")
|
||||
OpenIDColumn = postgres.StringColumn("open_id")
|
||||
AccessKeyColumn = postgres.StringColumn("access_key")
|
||||
AccessTokenColumn = postgres.StringColumn("access_token")
|
||||
RefreshTokenColumn = postgres.StringColumn("refresh_token")
|
||||
ExpireAtColumn = postgres.TimestampColumn("expire_at")
|
||||
MetaColumn = postgres.StringColumn("meta")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, ChannelColumn, UserIDColumn, UnionIDColumn, OpenIDColumn, AccessKeyColumn, AccessTokenColumn, RefreshTokenColumn, ExpireAtColumn, MetaColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, ChannelColumn, UserIDColumn, UnionIDColumn, OpenIDColumn, AccessKeyColumn, AccessTokenColumn, RefreshTokenColumn, ExpireAtColumn, MetaColumn}
|
||||
)
|
||||
|
||||
return userOauthsTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
DeletedAt: DeletedAtColumn,
|
||||
Channel: ChannelColumn,
|
||||
UserID: UserIDColumn,
|
||||
UnionID: UnionIDColumn,
|
||||
OpenID: OpenIDColumn,
|
||||
AccessKey: AccessKeyColumn,
|
||||
AccessToken: AccessTokenColumn,
|
||||
RefreshToken: RefreshTokenColumn,
|
||||
ExpireAt: ExpireAtColumn,
|
||||
Meta: MetaColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
111
backend/database/models/qvyun_v2/public/table/users.go
Normal file
111
backend/database/models/qvyun_v2/public/table/users.go
Normal file
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// 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 table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
)
|
||||
|
||||
var Users = newUsersTable("public", "users", "")
|
||||
|
||||
type usersTable struct {
|
||||
postgres.Table
|
||||
|
||||
// Columns
|
||||
ID postgres.ColumnInteger
|
||||
CreatedAt postgres.ColumnTimestamp
|
||||
UpdatedAt postgres.ColumnTimestamp
|
||||
DeletedAt postgres.ColumnTimestamp
|
||||
Status postgres.ColumnInteger
|
||||
Email postgres.ColumnString
|
||||
Phone postgres.ColumnString
|
||||
Username postgres.ColumnString
|
||||
Nickname postgres.ColumnString
|
||||
Password postgres.ColumnString
|
||||
Age postgres.ColumnInteger
|
||||
Sex postgres.ColumnInteger
|
||||
Avatar postgres.ColumnString
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
}
|
||||
|
||||
type UsersTable struct {
|
||||
usersTable
|
||||
|
||||
EXCLUDED usersTable
|
||||
}
|
||||
|
||||
// AS creates new UsersTable with assigned alias
|
||||
func (a UsersTable) AS(alias string) *UsersTable {
|
||||
return newUsersTable(a.SchemaName(), a.TableName(), alias)
|
||||
}
|
||||
|
||||
// Schema creates new UsersTable with assigned schema name
|
||||
func (a UsersTable) FromSchema(schemaName string) *UsersTable {
|
||||
return newUsersTable(schemaName, a.TableName(), a.Alias())
|
||||
}
|
||||
|
||||
// WithPrefix creates new UsersTable with assigned table prefix
|
||||
func (a UsersTable) WithPrefix(prefix string) *UsersTable {
|
||||
return newUsersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
||||
}
|
||||
|
||||
// WithSuffix creates new UsersTable with assigned table suffix
|
||||
func (a UsersTable) WithSuffix(suffix string) *UsersTable {
|
||||
return newUsersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
||||
}
|
||||
|
||||
func newUsersTable(schemaName, tableName, alias string) *UsersTable {
|
||||
return &UsersTable{
|
||||
usersTable: newUsersTableImpl(schemaName, tableName, alias),
|
||||
EXCLUDED: newUsersTableImpl("", "excluded", ""),
|
||||
}
|
||||
}
|
||||
|
||||
func newUsersTableImpl(schemaName, tableName, alias string) usersTable {
|
||||
var (
|
||||
IDColumn = postgres.IntegerColumn("id")
|
||||
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
||||
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
||||
DeletedAtColumn = postgres.TimestampColumn("deleted_at")
|
||||
StatusColumn = postgres.IntegerColumn("status")
|
||||
EmailColumn = postgres.StringColumn("email")
|
||||
PhoneColumn = postgres.StringColumn("phone")
|
||||
UsernameColumn = postgres.StringColumn("username")
|
||||
NicknameColumn = postgres.StringColumn("nickname")
|
||||
PasswordColumn = postgres.StringColumn("password")
|
||||
AgeColumn = postgres.IntegerColumn("age")
|
||||
SexColumn = postgres.IntegerColumn("sex")
|
||||
AvatarColumn = postgres.StringColumn("avatar")
|
||||
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, EmailColumn, PhoneColumn, UsernameColumn, NicknameColumn, PasswordColumn, AgeColumn, SexColumn, AvatarColumn}
|
||||
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn, StatusColumn, EmailColumn, PhoneColumn, UsernameColumn, NicknameColumn, PasswordColumn, AgeColumn, SexColumn, AvatarColumn}
|
||||
)
|
||||
|
||||
return usersTable{
|
||||
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
||||
|
||||
//Columns
|
||||
ID: IDColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
UpdatedAt: UpdatedAtColumn,
|
||||
DeletedAt: DeletedAtColumn,
|
||||
Status: StatusColumn,
|
||||
Email: EmailColumn,
|
||||
Phone: PhoneColumn,
|
||||
Username: UsernameColumn,
|
||||
Nickname: NicknameColumn,
|
||||
Password: PasswordColumn,
|
||||
Age: AgeColumn,
|
||||
Sex: SexColumn,
|
||||
Avatar: AvatarColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user