feat: Update project structure and configuration files
This commit is contained in:
21
backend/database/schemas/public/model/medias.go
Normal file
21
backend/database/schemas/public/model/medias.go
Normal 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 Medias struct {
|
||||
ID int64 `sql:"primary_key" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Name string `json:"name"`
|
||||
MimeType string `json:"mime_type"`
|
||||
Size int64 `json:"size"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
19
backend/database/schemas/public/model/migrations.go
Normal file
19
backend/database/schemas/public/model/migrations.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// 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 Migrations struct {
|
||||
ID int32 `sql:"primary_key" json:"id"`
|
||||
VersionID int64 `json:"version_id"`
|
||||
IsApplied bool `json:"is_applied"`
|
||||
Tstamp time.Time `json:"tstamp"`
|
||||
}
|
||||
30
backend/database/schemas/public/model/posts.go
Normal file
30
backend/database/schemas/public/model/posts.go
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 model
|
||||
|
||||
import (
|
||||
"quyun/database/fields"
|
||||
"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"`
|
||||
Status fields.PostStatus `json:"status"`
|
||||
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"`
|
||||
Tags fields.Json[[]string] `json:"tags"`
|
||||
Assets fields.Json[[]fields.MediaAsset] `json:"assets"`
|
||||
}
|
||||
73
backend/database/schemas/public/model/river_job_state.go
Normal file
73
backend/database/schemas/public/model/river_job_state.go
Normal 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)
|
||||
}
|
||||
21
backend/database/schemas/public/model/user_posts.go
Normal file
21
backend/database/schemas/public/model/user_posts.go
Normal 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 UserPosts struct {
|
||||
ID int64 `sql:"primary_key" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
UserID int64 `json:"user_id"`
|
||||
PostID int64 `json:"post_id"`
|
||||
Price int64 `json:"price"`
|
||||
}
|
||||
23
backend/database/schemas/public/model/users.go
Normal file
23
backend/database/schemas/public/model/users.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 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"`
|
||||
OpenID string `json:"open_id"`
|
||||
Username string `json:"username"`
|
||||
Avatar *string `json:"avatar"`
|
||||
}
|
||||
Reference in New Issue
Block a user