forked from ent/contrib
/
schema.go
68 lines (64 loc) · 2.01 KB
/
schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Code generated by ent, DO NOT EDIT.
package migrate
import (
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/schema/field"
)
var (
// AttachmentsColumns holds the columns for the "attachments" table.
AttachmentsColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "contents", Type: field.TypeString},
}
// AttachmentsTable holds the schema information for the "attachments" table.
AttachmentsTable = &schema.Table{
Name: "attachments",
Columns: AttachmentsColumns,
PrimaryKey: []*schema.Column{AttachmentsColumns[0]},
}
// FilesColumns holds the columns for the "files" table.
FilesColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "contents", Type: field.TypeString},
}
// FilesTable holds the schema information for the "files" table.
FilesTable = &schema.Table{
Name: "files",
Columns: FilesColumns,
PrimaryKey: []*schema.Column{FilesColumns[0]},
}
// TasksColumns holds the columns for the "tasks" table.
TasksColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "title", Type: field.TypeString, Nullable: true},
{Name: "description", Type: field.TypeString},
{Name: "complete", Type: field.TypeBool},
{Name: "signature", Type: field.TypeString},
}
// TasksTable holds the schema information for the "tasks" table.
TasksTable = &schema.Table{
Name: "tasks",
Columns: TasksColumns,
PrimaryKey: []*schema.Column{TasksColumns[0]},
}
// UsersColumns holds the columns for the "users" table.
UsersColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "name", Type: field.TypeString, Unique: true},
}
// UsersTable holds the schema information for the "users" table.
UsersTable = &schema.Table{
Name: "users",
Columns: UsersColumns,
PrimaryKey: []*schema.Column{UsersColumns[0]},
}
// Tables holds all the tables in the schema.
Tables = []*schema.Table{
AttachmentsTable,
FilesTable,
TasksTable,
UsersTable,
}
)
func init() {
}