feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"gorm.io/gorm"
)
const TableNameSpace = "space"
// Space Space Table
type Space struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:Primary Key ID, Space ID" json:"id"` // Primary Key ID, Space ID
OwnerID int64 `gorm:"column:owner_id;not null;comment:Owner ID" json:"owner_id"` // Owner ID
Name string `gorm:"column:name;not null;comment:Space Name" json:"name"` // Space Name
Description string `gorm:"column:description;not null;comment:Space Description" json:"description"` // Space Description
IconURI string `gorm:"column:icon_uri;not null;comment:Icon URI" json:"icon_uri"` // Icon URI
CreatorID int64 `gorm:"column:creator_id;not null;comment:Creator ID" json:"creator_id"` // Creator ID
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Creation Time (Milliseconds)" json:"created_at"` // Creation Time (Milliseconds)
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time (Milliseconds)" json:"updated_at"` // Update Time (Milliseconds)
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Deletion Time (Milliseconds)" json:"deleted_at"` // Deletion Time (Milliseconds)
}
// TableName Space's table name
func (*Space) TableName() string {
return TableNameSpace
}

View File

@@ -0,0 +1,22 @@
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
const TableNameSpaceUser = "space_user"
// SpaceUser Space Member Table
type SpaceUser struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:Primary Key ID, Auto Increment" json:"id"` // Primary Key ID, Auto Increment
SpaceID int64 `gorm:"column:space_id;not null;comment:Space ID" json:"space_id"` // Space ID
UserID int64 `gorm:"column:user_id;not null;comment:User ID" json:"user_id"` // User ID
RoleType int32 `gorm:"column:role_type;not null;default:3;comment:Role Type: 1.owner 2.admin 3.member" json:"role_type"` // Role Type: 1.owner 2.admin 3.member
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Creation Time (Milliseconds)" json:"created_at"` // Creation Time (Milliseconds)
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time (Milliseconds)" json:"updated_at"` // Update Time (Milliseconds)
}
// TableName SpaceUser's table name
func (*SpaceUser) TableName() string {
return TableNameSpaceUser
}

View File

@@ -0,0 +1,33 @@
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"gorm.io/gorm"
)
const TableNameUser = "user"
// User User Table
type User struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:Primary Key ID" json:"id"` // Primary Key ID
Name string `gorm:"column:name;not null;comment:User Nickname" json:"name"` // User Nickname
UniqueName string `gorm:"column:unique_name;not null;comment:User Unique Name" json:"unique_name"` // User Unique Name
Email string `gorm:"column:email;not null;comment:Email" json:"email"` // Email
Password string `gorm:"column:password;not null;comment:Password (Encrypted)" json:"password"` // Password (Encrypted)
Description string `gorm:"column:description;not null;comment:User Description" json:"description"` // User Description
IconURI string `gorm:"column:icon_uri;not null;comment:Avatar URI" json:"icon_uri"` // Avatar URI
UserVerified bool `gorm:"column:user_verified;not null;comment:User Verification Status" json:"user_verified"` // User Verification Status
Locale string `gorm:"column:locale;not null;comment:Locale" json:"locale"` // Locale
SessionKey string `gorm:"column:session_key;not null;comment:Session Key" json:"session_key"` // Session Key
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Creation Time (Milliseconds)" json:"created_at"` // Creation Time (Milliseconds)
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time (Milliseconds)" json:"updated_at"` // Update Time (Milliseconds)
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Deletion Time (Milliseconds)" json:"deleted_at"` // Deletion Time (Milliseconds)
}
// TableName User's table name
func (*User) TableName() string {
return TableNameUser
}