182 lines
5.6 KiB
Go
182 lines
5.6 KiB
Go
// 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: "uuid", Type: field.TypeString, Unique: true, Nullable: 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_uuid",
|
|
Unique: false,
|
|
Columns: []*schema.Column{DocumentsColumns[1]},
|
|
},
|
|
{
|
|
Name: "document_deleted_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{DocumentsColumns[4]},
|
|
},
|
|
{
|
|
Name: "document_title",
|
|
Unique: false,
|
|
Columns: []*schema.Column{DocumentsColumns[5]},
|
|
},
|
|
{
|
|
Name: "document_created_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{DocumentsColumns[2]},
|
|
},
|
|
{
|
|
Name: "document_updated_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{DocumentsColumns[3]},
|
|
},
|
|
},
|
|
}
|
|
// ExtensionsColumns holds the columns for the "extensions" table.
|
|
ExtensionsColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "uuid", Type: field.TypeString, Unique: true, Nullable: 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_uuid",
|
|
Unique: false,
|
|
Columns: []*schema.Column{ExtensionsColumns[1]},
|
|
},
|
|
{
|
|
Name: "extension_deleted_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{ExtensionsColumns[4]},
|
|
},
|
|
{
|
|
Name: "extension_enabled",
|
|
Unique: false,
|
|
Columns: []*schema.Column{ExtensionsColumns[6]},
|
|
},
|
|
},
|
|
}
|
|
// KeyBindingsColumns holds the columns for the "key_bindings" table.
|
|
KeyBindingsColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "uuid", Type: field.TypeString, Unique: true, Nullable: 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_uuid",
|
|
Unique: false,
|
|
Columns: []*schema.Column{KeyBindingsColumns[1]},
|
|
},
|
|
{
|
|
Name: "keybinding_deleted_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{KeyBindingsColumns[4]},
|
|
},
|
|
{
|
|
Name: "keybinding_extension",
|
|
Unique: false,
|
|
Columns: []*schema.Column{KeyBindingsColumns[7]},
|
|
},
|
|
{
|
|
Name: "keybinding_enabled",
|
|
Unique: false,
|
|
Columns: []*schema.Column{KeyBindingsColumns[8]},
|
|
},
|
|
},
|
|
}
|
|
// ThemesColumns holds the columns for the "themes" table.
|
|
ThemesColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "uuid", Type: field.TypeString, Unique: true, Nullable: 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_uuid",
|
|
Unique: false,
|
|
Columns: []*schema.Column{ThemesColumns[1]},
|
|
},
|
|
{
|
|
Name: "theme_deleted_at",
|
|
Unique: false,
|
|
Columns: []*schema.Column{ThemesColumns[4]},
|
|
},
|
|
},
|
|
}
|
|
// 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",
|
|
}
|
|
}
|