fix: 修复争议时间线表名映射
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
package migrate
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
var (
|
||||
// DisputeTimelinesColumns holds the columns for the "dispute_timelines" table.
|
||||
DisputeTimelinesColumns = []*schema.Column{
|
||||
// DisputeTimelineColumns holds the columns for the "dispute_timeline" table.
|
||||
DisputeTimelineColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "dispute_id", Type: field.TypeInt64},
|
||||
{Name: "event_type", Type: field.TypeString, Size: 30},
|
||||
@@ -18,16 +19,16 @@ var (
|
||||
{Name: "details", Type: field.TypeJSON, Nullable: true, SchemaType: map[string]string{"postgres": "jsonb"}},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// DisputeTimelinesTable holds the schema information for the "dispute_timelines" table.
|
||||
DisputeTimelinesTable = &schema.Table{
|
||||
Name: "dispute_timelines",
|
||||
Columns: DisputeTimelinesColumns,
|
||||
PrimaryKey: []*schema.Column{DisputeTimelinesColumns[0]},
|
||||
// DisputeTimelineTable holds the schema information for the "dispute_timeline" table.
|
||||
DisputeTimelineTable = &schema.Table{
|
||||
Name: "dispute_timeline",
|
||||
Columns: DisputeTimelineColumns,
|
||||
PrimaryKey: []*schema.Column{DisputeTimelineColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "disputetimeline_dispute_id_created_at",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{DisputeTimelinesColumns[1], DisputeTimelinesColumns[6]},
|
||||
Columns: []*schema.Column{DisputeTimelineColumns[1], DisputeTimelineColumns[6]},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -86,10 +87,13 @@ var (
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
DisputeTimelinesTable,
|
||||
DisputeTimelineTable,
|
||||
DisputesTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
DisputeTimelineTable.Annotation = &entsql.Annotation{
|
||||
Table: "dispute_timeline",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user