|
@@ -39,8 +39,8 @@ var (
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // ContactsColumns holds the columns for the "contacts" table.
|
|
|
- ContactsColumns = []*schema.Column{
|
|
|
+ // ContactColumns holds the columns for the "contact" table.
|
|
|
+ ContactColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -62,36 +62,36 @@ var (
|
|
|
{Name: "gname", Type: field.TypeString, Comment: "群组名称", Default: ""},
|
|
|
{Name: "v3", Type: field.TypeString, Comment: "v3数据", Default: ""},
|
|
|
}
|
|
|
- // ContactsTable holds the schema information for the "contacts" table.
|
|
|
- ContactsTable = &schema.Table{
|
|
|
- Name: "contacts",
|
|
|
- Columns: ContactsColumns,
|
|
|
- PrimaryKey: []*schema.Column{ContactsColumns[0]},
|
|
|
+ // ContactTable holds the schema information for the "contact" table.
|
|
|
+ ContactTable = &schema.Table{
|
|
|
+ Name: "contact",
|
|
|
+ Columns: ContactColumns,
|
|
|
+ PrimaryKey: []*schema.Column{ContactColumns[0]},
|
|
|
Indexes: []*schema.Index{
|
|
|
{
|
|
|
Name: "contact_wx_wxid_wxid",
|
|
|
Unique: true,
|
|
|
- Columns: []*schema.Column{ContactsColumns[5], ContactsColumns[7]},
|
|
|
+ Columns: []*schema.Column{ContactColumns[5], ContactColumns[7]},
|
|
|
},
|
|
|
{
|
|
|
Name: "contact_wxid",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{ContactsColumns[7]},
|
|
|
+ Columns: []*schema.Column{ContactColumns[7]},
|
|
|
},
|
|
|
{
|
|
|
Name: "contact_type",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{ContactsColumns[6]},
|
|
|
+ Columns: []*schema.Column{ContactColumns[6]},
|
|
|
},
|
|
|
{
|
|
|
Name: "contact_gid",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{ContactsColumns[17]},
|
|
|
+ Columns: []*schema.Column{ContactColumns[17]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // LabelsColumns holds the columns for the "labels" table.
|
|
|
- LabelsColumns = []*schema.Column{
|
|
|
+ // LabelColumns holds the columns for the "label" table.
|
|
|
+ LabelColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -103,21 +103,21 @@ var (
|
|
|
{Name: "mode", Type: field.TypeInt, Comment: "标签模式:1动态 2静态", Default: 1},
|
|
|
{Name: "conditions", Type: field.TypeString, Nullable: true, Comment: "标签的触达条件", Default: ""},
|
|
|
}
|
|
|
- // LabelsTable holds the schema information for the "labels" table.
|
|
|
- LabelsTable = &schema.Table{
|
|
|
- Name: "labels",
|
|
|
- Columns: LabelsColumns,
|
|
|
- PrimaryKey: []*schema.Column{LabelsColumns[0]},
|
|
|
+ // LabelTable holds the schema information for the "label" table.
|
|
|
+ LabelTable = &schema.Table{
|
|
|
+ Name: "label",
|
|
|
+ Columns: LabelColumns,
|
|
|
+ PrimaryKey: []*schema.Column{LabelColumns[0]},
|
|
|
Indexes: []*schema.Index{
|
|
|
{
|
|
|
Name: "label_name_from_mode",
|
|
|
Unique: true,
|
|
|
- Columns: []*schema.Column{LabelsColumns[6], LabelsColumns[7], LabelsColumns[8]},
|
|
|
+ Columns: []*schema.Column{LabelColumns[6], LabelColumns[7], LabelColumns[8]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // LabelRelationshipsColumns holds the columns for the "label_relationships" table.
|
|
|
- LabelRelationshipsColumns = []*schema.Column{
|
|
|
+ // LabelRelationshipColumns holds the columns for the "label_relationship" table.
|
|
|
+ LabelRelationshipColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -126,22 +126,22 @@ var (
|
|
|
{Name: "contact_id", Type: field.TypeUint64, Comment: "联系人 ID", Default: 1},
|
|
|
{Name: "label_id", Type: field.TypeUint64, Comment: "标签 ID", Default: 1},
|
|
|
}
|
|
|
- // LabelRelationshipsTable holds the schema information for the "label_relationships" table.
|
|
|
- LabelRelationshipsTable = &schema.Table{
|
|
|
- Name: "label_relationships",
|
|
|
- Columns: LabelRelationshipsColumns,
|
|
|
- PrimaryKey: []*schema.Column{LabelRelationshipsColumns[0]},
|
|
|
+ // LabelRelationshipTable holds the schema information for the "label_relationship" table.
|
|
|
+ LabelRelationshipTable = &schema.Table{
|
|
|
+ Name: "label_relationship",
|
|
|
+ Columns: LabelRelationshipColumns,
|
|
|
+ PrimaryKey: []*schema.Column{LabelRelationshipColumns[0]},
|
|
|
ForeignKeys: []*schema.ForeignKey{
|
|
|
{
|
|
|
- Symbol: "label_relationships_contacts_contact_relationships",
|
|
|
- Columns: []*schema.Column{LabelRelationshipsColumns[5]},
|
|
|
- RefColumns: []*schema.Column{ContactsColumns[0]},
|
|
|
+ Symbol: "label_relationship_contact_contact_relationships",
|
|
|
+ Columns: []*schema.Column{LabelRelationshipColumns[5]},
|
|
|
+ RefColumns: []*schema.Column{ContactColumns[0]},
|
|
|
OnDelete: schema.NoAction,
|
|
|
},
|
|
|
{
|
|
|
- Symbol: "label_relationships_labels_label_relationships",
|
|
|
- Columns: []*schema.Column{LabelRelationshipsColumns[6]},
|
|
|
- RefColumns: []*schema.Column{LabelsColumns[0]},
|
|
|
+ Symbol: "label_relationship_label_label_relationships",
|
|
|
+ Columns: []*schema.Column{LabelRelationshipColumns[6]},
|
|
|
+ RefColumns: []*schema.Column{LabelColumns[0]},
|
|
|
OnDelete: schema.NoAction,
|
|
|
},
|
|
|
},
|
|
@@ -149,12 +149,12 @@ var (
|
|
|
{
|
|
|
Name: "labelrelationship_label_id",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{LabelRelationshipsColumns[6]},
|
|
|
+ Columns: []*schema.Column{LabelRelationshipColumns[6]},
|
|
|
},
|
|
|
{
|
|
|
Name: "labelrelationship_contact_id",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{LabelRelationshipsColumns[5]},
|
|
|
+ Columns: []*schema.Column{LabelRelationshipColumns[5]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
@@ -171,8 +171,8 @@ var (
|
|
|
Columns: MessagesColumns,
|
|
|
PrimaryKey: []*schema.Column{MessagesColumns[0]},
|
|
|
}
|
|
|
- // MessageRecordssColumns holds the columns for the "message_recordss" table.
|
|
|
- MessageRecordssColumns = []*schema.Column{
|
|
|
+ // MessageRecordsColumns holds the columns for the "message_records" table.
|
|
|
+ MessageRecordsColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -191,28 +191,28 @@ var (
|
|
|
{Name: "sub_source_id", Type: field.TypeUint64, Nullable: true, Comment: "次源 ID", Default: 1},
|
|
|
{Name: "source_id", Type: field.TypeUint64, Nullable: true, Comment: "源 ID", Default: 1},
|
|
|
}
|
|
|
- // MessageRecordssTable holds the schema information for the "message_recordss" table.
|
|
|
- MessageRecordssTable = &schema.Table{
|
|
|
- Name: "message_recordss",
|
|
|
- Columns: MessageRecordssColumns,
|
|
|
- PrimaryKey: []*schema.Column{MessageRecordssColumns[0]},
|
|
|
+ // MessageRecordsTable holds the schema information for the "message_records" table.
|
|
|
+ MessageRecordsTable = &schema.Table{
|
|
|
+ Name: "message_records",
|
|
|
+ Columns: MessageRecordsColumns,
|
|
|
+ PrimaryKey: []*schema.Column{MessageRecordsColumns[0]},
|
|
|
ForeignKeys: []*schema.ForeignKey{
|
|
|
{
|
|
|
- Symbol: "message_recordss_contacts_contact_messages",
|
|
|
- Columns: []*schema.Column{MessageRecordssColumns[14]},
|
|
|
- RefColumns: []*schema.Column{ContactsColumns[0]},
|
|
|
+ Symbol: "message_records_contact_contact_messages",
|
|
|
+ Columns: []*schema.Column{MessageRecordsColumns[14]},
|
|
|
+ RefColumns: []*schema.Column{ContactColumns[0]},
|
|
|
OnDelete: schema.SetNull,
|
|
|
},
|
|
|
{
|
|
|
- Symbol: "message_recordss_sop_nodes_node_messages",
|
|
|
- Columns: []*schema.Column{MessageRecordssColumns[15]},
|
|
|
- RefColumns: []*schema.Column{SopNodesColumns[0]},
|
|
|
+ Symbol: "message_records_sop_node_node_messages",
|
|
|
+ Columns: []*schema.Column{MessageRecordsColumns[15]},
|
|
|
+ RefColumns: []*schema.Column{SopNodeColumns[0]},
|
|
|
OnDelete: schema.SetNull,
|
|
|
},
|
|
|
{
|
|
|
- Symbol: "message_recordss_sop_stages_stage_messages",
|
|
|
- Columns: []*schema.Column{MessageRecordssColumns[16]},
|
|
|
- RefColumns: []*schema.Column{SopStagesColumns[0]},
|
|
|
+ Symbol: "message_records_sop_stage_stage_messages",
|
|
|
+ Columns: []*schema.Column{MessageRecordsColumns[16]},
|
|
|
+ RefColumns: []*schema.Column{SopStageColumns[0]},
|
|
|
OnDelete: schema.SetNull,
|
|
|
},
|
|
|
},
|
|
@@ -220,12 +220,12 @@ var (
|
|
|
{
|
|
|
Name: "messagerecords_source_type",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{MessageRecordssColumns[13]},
|
|
|
+ Columns: []*schema.Column{MessageRecordsColumns[13]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // ServersColumns holds the columns for the "servers" table.
|
|
|
- ServersColumns = []*schema.Column{
|
|
|
+ // ServerColumns holds the columns for the "server" table.
|
|
|
+ ServerColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -236,31 +236,31 @@ var (
|
|
|
{Name: "private_ip", Type: field.TypeString, Comment: "内网ip"},
|
|
|
{Name: "admin_port", Type: field.TypeString, Comment: "管理端口"},
|
|
|
}
|
|
|
- // ServersTable holds the schema information for the "servers" table.
|
|
|
- ServersTable = &schema.Table{
|
|
|
- Name: "servers",
|
|
|
- Columns: ServersColumns,
|
|
|
- PrimaryKey: []*schema.Column{ServersColumns[0]},
|
|
|
+ // ServerTable holds the schema information for the "server" table.
|
|
|
+ ServerTable = &schema.Table{
|
|
|
+ Name: "server",
|
|
|
+ Columns: ServerColumns,
|
|
|
+ PrimaryKey: []*schema.Column{ServerColumns[0]},
|
|
|
Indexes: []*schema.Index{
|
|
|
{
|
|
|
Name: "server_name",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{ServersColumns[5]},
|
|
|
+ Columns: []*schema.Column{ServerColumns[5]},
|
|
|
},
|
|
|
{
|
|
|
Name: "server_private_ip",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{ServersColumns[7]},
|
|
|
+ Columns: []*schema.Column{ServerColumns[7]},
|
|
|
},
|
|
|
{
|
|
|
Name: "server_public_ip",
|
|
|
Unique: true,
|
|
|
- Columns: []*schema.Column{ServersColumns[6]},
|
|
|
+ Columns: []*schema.Column{ServerColumns[6]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // SopNodesColumns holds the columns for the "sop_nodes" table.
|
|
|
- SopNodesColumns = []*schema.Column{
|
|
|
+ // SopNodeColumns holds the columns for the "sop_node" table.
|
|
|
+ SopNodeColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -275,16 +275,16 @@ var (
|
|
|
{Name: "action_label", Type: field.TypeJSON, Nullable: true, Comment: "命中后需要打的标签"},
|
|
|
{Name: "stage_id", Type: field.TypeUint64, Comment: "阶段 ID"},
|
|
|
}
|
|
|
- // SopNodesTable holds the schema information for the "sop_nodes" table.
|
|
|
- SopNodesTable = &schema.Table{
|
|
|
- Name: "sop_nodes",
|
|
|
- Columns: SopNodesColumns,
|
|
|
- PrimaryKey: []*schema.Column{SopNodesColumns[0]},
|
|
|
+ // SopNodeTable holds the schema information for the "sop_node" table.
|
|
|
+ SopNodeTable = &schema.Table{
|
|
|
+ Name: "sop_node",
|
|
|
+ Columns: SopNodeColumns,
|
|
|
+ PrimaryKey: []*schema.Column{SopNodeColumns[0]},
|
|
|
ForeignKeys: []*schema.ForeignKey{
|
|
|
{
|
|
|
- Symbol: "sop_nodes_sop_stages_stage_nodes",
|
|
|
- Columns: []*schema.Column{SopNodesColumns[12]},
|
|
|
- RefColumns: []*schema.Column{SopStagesColumns[0]},
|
|
|
+ Symbol: "sop_node_sop_stage_stage_nodes",
|
|
|
+ Columns: []*schema.Column{SopNodeColumns[12]},
|
|
|
+ RefColumns: []*schema.Column{SopStageColumns[0]},
|
|
|
OnDelete: schema.NoAction,
|
|
|
},
|
|
|
},
|
|
@@ -292,12 +292,12 @@ var (
|
|
|
{
|
|
|
Name: "sopnode_name",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{SopNodesColumns[6]},
|
|
|
+ Columns: []*schema.Column{SopNodeColumns[6]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // SopStagesColumns holds the columns for the "sop_stages" table.
|
|
|
- SopStagesColumns = []*schema.Column{
|
|
|
+ // SopStageColumns holds the columns for the "sop_stage" table.
|
|
|
+ SopStageColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -312,16 +312,16 @@ var (
|
|
|
{Name: "index_sort", Type: field.TypeInt, Nullable: true, Comment: "阶段顺序", Default: 1},
|
|
|
{Name: "task_id", Type: field.TypeUint64, Comment: "SOP 任务 ID"},
|
|
|
}
|
|
|
- // SopStagesTable holds the schema information for the "sop_stages" table.
|
|
|
- SopStagesTable = &schema.Table{
|
|
|
- Name: "sop_stages",
|
|
|
- Columns: SopStagesColumns,
|
|
|
- PrimaryKey: []*schema.Column{SopStagesColumns[0]},
|
|
|
+ // SopStageTable holds the schema information for the "sop_stage" table.
|
|
|
+ SopStageTable = &schema.Table{
|
|
|
+ Name: "sop_stage",
|
|
|
+ Columns: SopStageColumns,
|
|
|
+ PrimaryKey: []*schema.Column{SopStageColumns[0]},
|
|
|
ForeignKeys: []*schema.ForeignKey{
|
|
|
{
|
|
|
- Symbol: "sop_stages_sop_tasks_task_stages",
|
|
|
- Columns: []*schema.Column{SopStagesColumns[12]},
|
|
|
- RefColumns: []*schema.Column{SopTasksColumns[0]},
|
|
|
+ Symbol: "sop_stage_sop_task_task_stages",
|
|
|
+ Columns: []*schema.Column{SopStageColumns[12]},
|
|
|
+ RefColumns: []*schema.Column{SopTaskColumns[0]},
|
|
|
OnDelete: schema.NoAction,
|
|
|
},
|
|
|
},
|
|
@@ -329,12 +329,12 @@ var (
|
|
|
{
|
|
|
Name: "sopstage_name",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{SopStagesColumns[5]},
|
|
|
+ Columns: []*schema.Column{SopStageColumns[5]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // SopTasksColumns holds the columns for the "sop_tasks" table.
|
|
|
- SopTasksColumns = []*schema.Column{
|
|
|
+ // SopTaskColumns holds the columns for the "sop_task" table.
|
|
|
+ SopTaskColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -347,21 +347,21 @@ var (
|
|
|
{Name: "plan_end_time", Type: field.TypeTime, Nullable: true, Comment: "任务计划结束时间"},
|
|
|
{Name: "creator_id", Type: field.TypeString, Nullable: true, Comment: "创建者 id"},
|
|
|
}
|
|
|
- // SopTasksTable holds the schema information for the "sop_tasks" table.
|
|
|
- SopTasksTable = &schema.Table{
|
|
|
- Name: "sop_tasks",
|
|
|
- Columns: SopTasksColumns,
|
|
|
- PrimaryKey: []*schema.Column{SopTasksColumns[0]},
|
|
|
+ // SopTaskTable holds the schema information for the "sop_task" table.
|
|
|
+ SopTaskTable = &schema.Table{
|
|
|
+ Name: "sop_task",
|
|
|
+ Columns: SopTaskColumns,
|
|
|
+ PrimaryKey: []*schema.Column{SopTaskColumns[0]},
|
|
|
Indexes: []*schema.Index{
|
|
|
{
|
|
|
Name: "soptask_name",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{SopTasksColumns[5]},
|
|
|
+ Columns: []*schema.Column{SopTaskColumns[5]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
- // WxsColumns holds the columns for the "wxs" table.
|
|
|
- WxsColumns = []*schema.Column{
|
|
|
+ // WxColumns holds the columns for the "wx" table.
|
|
|
+ WxColumns = []*schema.Column{
|
|
|
{Name: "id", Type: field.TypeUint64, Increment: true},
|
|
|
{Name: "created_at", Type: field.TypeTime, Comment: "Create Time | 创建日期"},
|
|
|
{Name: "updated_at", Type: field.TypeTime, Comment: "Update Time | 修改日期"},
|
|
@@ -377,16 +377,16 @@ var (
|
|
|
{Name: "head_big", Type: field.TypeString, Comment: "微信头像", Default: ""},
|
|
|
{Name: "server_id", Type: field.TypeUint64, Nullable: true, Comment: "服务器id", Default: 0},
|
|
|
}
|
|
|
- // WxsTable holds the schema information for the "wxs" table.
|
|
|
- WxsTable = &schema.Table{
|
|
|
- Name: "wxs",
|
|
|
- Columns: WxsColumns,
|
|
|
- PrimaryKey: []*schema.Column{WxsColumns[0]},
|
|
|
+ // WxTable holds the schema information for the "wx" table.
|
|
|
+ WxTable = &schema.Table{
|
|
|
+ Name: "wx",
|
|
|
+ Columns: WxColumns,
|
|
|
+ PrimaryKey: []*schema.Column{WxColumns[0]},
|
|
|
ForeignKeys: []*schema.ForeignKey{
|
|
|
{
|
|
|
- Symbol: "wxs_servers_wxs",
|
|
|
- Columns: []*schema.Column{WxsColumns[13]},
|
|
|
- RefColumns: []*schema.Column{ServersColumns[0]},
|
|
|
+ Symbol: "wx_server_wxs",
|
|
|
+ Columns: []*schema.Column{WxColumns[13]},
|
|
|
+ RefColumns: []*schema.Column{ServerColumns[0]},
|
|
|
OnDelete: schema.SetNull,
|
|
|
},
|
|
|
},
|
|
@@ -394,43 +394,43 @@ var (
|
|
|
{
|
|
|
Name: "wx_server_id_port",
|
|
|
Unique: true,
|
|
|
- Columns: []*schema.Column{WxsColumns[13], WxsColumns[5]},
|
|
|
+ Columns: []*schema.Column{WxColumns[13], WxColumns[5]},
|
|
|
},
|
|
|
{
|
|
|
Name: "wx_wxid",
|
|
|
Unique: true,
|
|
|
- Columns: []*schema.Column{WxsColumns[8]},
|
|
|
+ Columns: []*schema.Column{WxColumns[8]},
|
|
|
},
|
|
|
{
|
|
|
Name: "wx_account",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{WxsColumns[9]},
|
|
|
+ Columns: []*schema.Column{WxColumns[9]},
|
|
|
},
|
|
|
{
|
|
|
Name: "wx_nickname",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{WxsColumns[10]},
|
|
|
+ Columns: []*schema.Column{WxColumns[10]},
|
|
|
},
|
|
|
{
|
|
|
Name: "wx_tel",
|
|
|
Unique: false,
|
|
|
- Columns: []*schema.Column{WxsColumns[11]},
|
|
|
+ Columns: []*schema.Column{WxColumns[11]},
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
// Tables holds all the tables in the schema.
|
|
|
Tables = []*schema.Table{
|
|
|
BatchMsgTable,
|
|
|
- ContactsTable,
|
|
|
- LabelsTable,
|
|
|
- LabelRelationshipsTable,
|
|
|
+ ContactTable,
|
|
|
+ LabelTable,
|
|
|
+ LabelRelationshipTable,
|
|
|
MessagesTable,
|
|
|
- MessageRecordssTable,
|
|
|
- ServersTable,
|
|
|
- SopNodesTable,
|
|
|
- SopStagesTable,
|
|
|
- SopTasksTable,
|
|
|
- WxsTable,
|
|
|
+ MessageRecordsTable,
|
|
|
+ ServerTable,
|
|
|
+ SopNodeTable,
|
|
|
+ SopStageTable,
|
|
|
+ SopTaskTable,
|
|
|
+ WxTable,
|
|
|
}
|
|
|
)
|
|
|
|
|
@@ -438,42 +438,42 @@ func init() {
|
|
|
BatchMsgTable.Annotation = &entsql.Annotation{
|
|
|
Table: "batch_msg",
|
|
|
}
|
|
|
- ContactsTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "contacts",
|
|
|
+ ContactTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "contact",
|
|
|
}
|
|
|
- LabelsTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "labels",
|
|
|
+ LabelTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "label",
|
|
|
}
|
|
|
- LabelRelationshipsTable.ForeignKeys[0].RefTable = ContactsTable
|
|
|
- LabelRelationshipsTable.ForeignKeys[1].RefTable = LabelsTable
|
|
|
- LabelRelationshipsTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "label_relationships",
|
|
|
+ LabelRelationshipTable.ForeignKeys[0].RefTable = ContactTable
|
|
|
+ LabelRelationshipTable.ForeignKeys[1].RefTable = LabelTable
|
|
|
+ LabelRelationshipTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "label_relationship",
|
|
|
}
|
|
|
MessagesTable.Annotation = &entsql.Annotation{
|
|
|
Table: "messages",
|
|
|
}
|
|
|
- MessageRecordssTable.ForeignKeys[0].RefTable = ContactsTable
|
|
|
- MessageRecordssTable.ForeignKeys[1].RefTable = SopNodesTable
|
|
|
- MessageRecordssTable.ForeignKeys[2].RefTable = SopStagesTable
|
|
|
- MessageRecordssTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "message_recordss",
|
|
|
+ MessageRecordsTable.ForeignKeys[0].RefTable = ContactTable
|
|
|
+ MessageRecordsTable.ForeignKeys[1].RefTable = SopNodeTable
|
|
|
+ MessageRecordsTable.ForeignKeys[2].RefTable = SopStageTable
|
|
|
+ MessageRecordsTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "message_records",
|
|
|
}
|
|
|
- ServersTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "servers",
|
|
|
+ ServerTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "server",
|
|
|
}
|
|
|
- SopNodesTable.ForeignKeys[0].RefTable = SopStagesTable
|
|
|
- SopNodesTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "sop_nodes",
|
|
|
+ SopNodeTable.ForeignKeys[0].RefTable = SopStageTable
|
|
|
+ SopNodeTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "sop_node",
|
|
|
}
|
|
|
- SopStagesTable.ForeignKeys[0].RefTable = SopTasksTable
|
|
|
- SopStagesTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "sop_stages",
|
|
|
+ SopStageTable.ForeignKeys[0].RefTable = SopTaskTable
|
|
|
+ SopStageTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "sop_stage",
|
|
|
}
|
|
|
- SopTasksTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "sop_tasks",
|
|
|
+ SopTaskTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "sop_task",
|
|
|
}
|
|
|
- WxsTable.ForeignKeys[0].RefTable = ServersTable
|
|
|
- WxsTable.Annotation = &entsql.Annotation{
|
|
|
- Table: "wxs",
|
|
|
+ WxTable.ForeignKeys[0].RefTable = ServerTable
|
|
|
+ WxTable.Annotation = &entsql.Annotation{
|
|
|
+ Table: "wx",
|
|
|
}
|
|
|
}
|