at main 1.9 kB view raw
1// Code generated by ent, DO NOT EDIT. 2 3package migrate 4 5import ( 6 "entgo.io/ent/dialect/sql/schema" 7 "entgo.io/ent/schema/field" 8) 9 10var ( 11 // OperationsColumns holds the columns for the "operations" table. 12 OperationsColumns = []*schema.Column{ 13 {Name: "id", Type: field.TypeInt, Increment: true}, 14 {Name: "did", Type: field.TypeString}, 15 {Name: "operation", Type: field.TypeJSON}, 16 {Name: "cid", Type: field.TypeString}, 17 {Name: "nullified", Type: field.TypeBool, Default: false}, 18 {Name: "created_at", Type: field.TypeTime}, 19 } 20 // OperationsTable holds the schema information for the "operations" table. 21 OperationsTable = &schema.Table{ 22 Name: "operations", 23 Columns: OperationsColumns, 24 PrimaryKey: []*schema.Column{OperationsColumns[0]}, 25 Indexes: []*schema.Index{ 26 { 27 Name: "operation_did_cid", 28 Unique: true, 29 Columns: []*schema.Column{OperationsColumns[1], OperationsColumns[3]}, 30 }, 31 { 32 Name: "operation_created_at", 33 Unique: false, 34 Columns: []*schema.Column{OperationsColumns[5]}, 35 }, 36 { 37 Name: "operation_did_created_at", 38 Unique: false, 39 Columns: []*schema.Column{OperationsColumns[1], OperationsColumns[5]}, 40 }, 41 }, 42 } 43 // SyncStatusColumns holds the columns for the "sync_status" table. 44 SyncStatusColumns = []*schema.Column{ 45 {Name: "id", Type: field.TypeInt, Increment: true}, 46 {Name: "key", Type: field.TypeString, Unique: true}, 47 {Name: "last_operation_time", Type: field.TypeTime}, 48 {Name: "last_sync_time", Type: field.TypeTime}, 49 } 50 // SyncStatusTable holds the schema information for the "sync_status" table. 51 SyncStatusTable = &schema.Table{ 52 Name: "sync_status", 53 Columns: SyncStatusColumns, 54 PrimaryKey: []*schema.Column{SyncStatusColumns[0]}, 55 } 56 // Tables holds all the tables in the schema. 57 Tables = []*schema.Table{ 58 OperationsTable, 59 SyncStatusTable, 60 } 61) 62 63func init() { 64}