/
schema.go
91 lines (87 loc) · 3.11 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Code generated by entc, DO NOT EDIT.
package migrate
import (
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/schema/field"
)
var (
// DchatsColumns holds the columns for the "dchats" table.
DchatsColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "session_id", Type: field.TypeString},
{Name: "user_id", Type: field.TypeString},
{Name: "room_id", Type: field.TypeString},
{Name: "text", Type: field.TypeString},
{Name: "create_time", Type: field.TypeTime},
}
// DchatsTable holds the schema information for the "dchats" table.
DchatsTable = &schema.Table{
Name: "dchats",
Columns: DchatsColumns,
PrimaryKey: []*schema.Column{DchatsColumns[0]},
}
// DchessdbCachesColumns holds the columns for the "dchessdb_caches" table.
DchessdbCachesColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "board", Type: field.TypeString, Unique: true},
{Name: "resp", Type: field.TypeBytes},
{Name: "create_time", Type: field.TypeTime},
}
// DchessdbCachesTable holds the schema information for the "dchessdb_caches" table.
DchessdbCachesTable = &schema.Table{
Name: "dchessdb_caches",
Columns: DchessdbCachesColumns,
PrimaryKey: []*schema.Column{DchessdbCachesColumns[0]},
}
// DroomsColumns holds the columns for the "drooms" table.
DroomsColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "is_game_running", Type: field.TypeBool, Nullable: true, Default: false},
{Name: "panel", Type: field.TypeString, Nullable: true, Default: ""},
{Name: "w_user_id", Type: field.TypeString, Nullable: true, Default: ""},
{Name: "b_user_id", Type: field.TypeString, Nullable: true, Default: ""},
{Name: "create_time", Type: field.TypeTime},
}
// DroomsTable holds the schema information for the "drooms" table.
DroomsTable = &schema.Table{
Name: "drooms",
Columns: DroomsColumns,
PrimaryKey: []*schema.Column{DroomsColumns[0]},
}
// DsessionsColumns holds the columns for the "dsessions" table.
DsessionsColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "user_id", Type: field.TypeString, Default: ""},
{Name: "room_id", Type: field.TypeString, Default: ""},
{Name: "create_time", Type: field.TypeTime},
}
// DsessionsTable holds the schema information for the "dsessions" table.
DsessionsTable = &schema.Table{
Name: "dsessions",
Columns: DsessionsColumns,
PrimaryKey: []*schema.Column{DsessionsColumns[0]},
}
// DusersColumns holds the columns for the "dusers" table.
DusersColumns = []*schema.Column{
{Name: "id", Type: field.TypeString},
{Name: "name", Type: field.TypeString, Unique: true},
{Name: "password_hash", Type: field.TypeString},
{Name: "create_time", Type: field.TypeTime},
}
// DusersTable holds the schema information for the "dusers" table.
DusersTable = &schema.Table{
Name: "dusers",
Columns: DusersColumns,
PrimaryKey: []*schema.Column{DusersColumns[0]},
}
// Tables holds all the tables in the schema.
Tables = []*schema.Table{
DchatsTable,
DchessdbCachesTable,
DroomsTable,
DsessionsTable,
DusersTable,
}
)
func init() {
}