🚧 Refactor basic services
This commit is contained in:
157
internal/models/ent/migrate/schema.go
Normal file
157
internal/models/ent/migrate/schema.go
Normal file
@@ -0,0 +1,157 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package migrate
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
var (
|
||||
// DocumentsColumns holds the columns for the "documents" table.
|
||||
DocumentsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "created_at", Type: field.TypeString},
|
||||
{Name: "updated_at", Type: field.TypeString},
|
||||
{Name: "deleted_at", Type: field.TypeString, Nullable: true},
|
||||
{Name: "title", Type: field.TypeString, Size: 255},
|
||||
{Name: "content", Type: field.TypeString, Nullable: true, Size: 2147483647, Default: "\n∞∞∞text-a\n"},
|
||||
{Name: "locked", Type: field.TypeBool, Default: false},
|
||||
}
|
||||
// DocumentsTable holds the schema information for the "documents" table.
|
||||
DocumentsTable = &schema.Table{
|
||||
Name: "documents",
|
||||
Columns: DocumentsColumns,
|
||||
PrimaryKey: []*schema.Column{DocumentsColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "document_deleted_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{DocumentsColumns[3]},
|
||||
},
|
||||
{
|
||||
Name: "document_title",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{DocumentsColumns[4]},
|
||||
},
|
||||
{
|
||||
Name: "document_created_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{DocumentsColumns[1]},
|
||||
},
|
||||
{
|
||||
Name: "document_updated_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{DocumentsColumns[2]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// ExtensionsColumns holds the columns for the "extensions" table.
|
||||
ExtensionsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "created_at", Type: field.TypeString},
|
||||
{Name: "updated_at", Type: field.TypeString},
|
||||
{Name: "deleted_at", Type: field.TypeString, Nullable: true},
|
||||
{Name: "key", Type: field.TypeString, Unique: true, Size: 100},
|
||||
{Name: "enabled", Type: field.TypeBool, Default: true},
|
||||
{Name: "config", Type: field.TypeJSON, Nullable: true},
|
||||
}
|
||||
// ExtensionsTable holds the schema information for the "extensions" table.
|
||||
ExtensionsTable = &schema.Table{
|
||||
Name: "extensions",
|
||||
Columns: ExtensionsColumns,
|
||||
PrimaryKey: []*schema.Column{ExtensionsColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "extension_deleted_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{ExtensionsColumns[3]},
|
||||
},
|
||||
{
|
||||
Name: "extension_enabled",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{ExtensionsColumns[5]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// KeyBindingsColumns holds the columns for the "key_bindings" table.
|
||||
KeyBindingsColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "created_at", Type: field.TypeString},
|
||||
{Name: "updated_at", Type: field.TypeString},
|
||||
{Name: "deleted_at", Type: field.TypeString, Nullable: true},
|
||||
{Name: "key", Type: field.TypeString, Unique: true, Size: 100},
|
||||
{Name: "command", Type: field.TypeString, Size: 100},
|
||||
{Name: "extension", Type: field.TypeString, Nullable: true, Size: 100},
|
||||
{Name: "enabled", Type: field.TypeBool, Default: true},
|
||||
}
|
||||
// KeyBindingsTable holds the schema information for the "key_bindings" table.
|
||||
KeyBindingsTable = &schema.Table{
|
||||
Name: "key_bindings",
|
||||
Columns: KeyBindingsColumns,
|
||||
PrimaryKey: []*schema.Column{KeyBindingsColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "keybinding_deleted_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{KeyBindingsColumns[3]},
|
||||
},
|
||||
{
|
||||
Name: "keybinding_extension",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{KeyBindingsColumns[6]},
|
||||
},
|
||||
{
|
||||
Name: "keybinding_enabled",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{KeyBindingsColumns[7]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// ThemesColumns holds the columns for the "themes" table.
|
||||
ThemesColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "created_at", Type: field.TypeString},
|
||||
{Name: "updated_at", Type: field.TypeString},
|
||||
{Name: "deleted_at", Type: field.TypeString, Nullable: true},
|
||||
{Name: "key", Type: field.TypeString, Unique: true, Size: 100},
|
||||
{Name: "type", Type: field.TypeEnum, Enums: []string{"dark", "light"}},
|
||||
{Name: "colors", Type: field.TypeJSON, Nullable: true},
|
||||
}
|
||||
// ThemesTable holds the schema information for the "themes" table.
|
||||
ThemesTable = &schema.Table{
|
||||
Name: "themes",
|
||||
Columns: ThemesColumns,
|
||||
PrimaryKey: []*schema.Column{ThemesColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "theme_deleted_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{ThemesColumns[3]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
DocumentsTable,
|
||||
ExtensionsTable,
|
||||
KeyBindingsTable,
|
||||
ThemesTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
DocumentsTable.Annotation = &entsql.Annotation{
|
||||
Table: "documents",
|
||||
}
|
||||
ExtensionsTable.Annotation = &entsql.Annotation{
|
||||
Table: "extensions",
|
||||
}
|
||||
KeyBindingsTable.Annotation = &entsql.Annotation{
|
||||
Table: "key_bindings",
|
||||
}
|
||||
ThemesTable.Annotation = &entsql.Annotation{
|
||||
Table: "themes",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user