add initial application structure with configuration, logging, and health check endpoints
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 (
|
||||
// EpicArtifactInfosColumns holds the columns for the "epic_artifact_infos" table.
|
||||
EpicArtifactInfosColumns = []*schema.Column{
|
||||
// EpicArtifactInfoColumns holds the columns for the "epic_artifact_info" table.
|
||||
EpicArtifactInfoColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "artifact_name", Type: field.TypeString, Size: 255},
|
||||
{Name: "artifact_code", Type: field.TypeString, Size: 255},
|
||||
@@ -26,11 +27,11 @@ var (
|
||||
{Name: "artifact_name_en", Type: field.TypeString, Size: 255},
|
||||
{Name: "image_url", Type: field.TypeString, Size: 255},
|
||||
}
|
||||
// EpicArtifactInfosTable holds the schema information for the "epic_artifact_infos" table.
|
||||
EpicArtifactInfosTable = &schema.Table{
|
||||
Name: "epic_artifact_infos",
|
||||
Columns: EpicArtifactInfosColumns,
|
||||
PrimaryKey: []*schema.Column{EpicArtifactInfosColumns[0]},
|
||||
// EpicArtifactInfoTable holds the schema information for the "epic_artifact_info" table.
|
||||
EpicArtifactInfoTable = &schema.Table{
|
||||
Name: "epic_artifact_info",
|
||||
Columns: EpicArtifactInfoColumns,
|
||||
PrimaryKey: []*schema.Column{EpicArtifactInfoColumns[0]},
|
||||
}
|
||||
// EpicGvgAttackTeamsColumns holds the columns for the "epic_gvg_attack_teams" table.
|
||||
EpicGvgAttackTeamsColumns = []*schema.Column{
|
||||
@@ -48,8 +49,8 @@ var (
|
||||
Columns: EpicGvgAttackTeamsColumns,
|
||||
PrimaryKey: []*schema.Column{EpicGvgAttackTeamsColumns[0]},
|
||||
}
|
||||
// EpicGvgDefenseAttackMappingsColumns holds the columns for the "epic_gvg_defense_attack_mappings" table.
|
||||
EpicGvgDefenseAttackMappingsColumns = []*schema.Column{
|
||||
// EpicGvgDefenseAttackMappingColumns holds the columns for the "epic_gvg_defense_attack_mapping" table.
|
||||
EpicGvgDefenseAttackMappingColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "defense_id", Type: field.TypeInt64},
|
||||
{Name: "attack_id", Type: field.TypeInt64},
|
||||
@@ -64,11 +65,11 @@ var (
|
||||
{Name: "update_time", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "deleted", Type: field.TypeBool},
|
||||
}
|
||||
// EpicGvgDefenseAttackMappingsTable holds the schema information for the "epic_gvg_defense_attack_mappings" table.
|
||||
EpicGvgDefenseAttackMappingsTable = &schema.Table{
|
||||
Name: "epic_gvg_defense_attack_mappings",
|
||||
Columns: EpicGvgDefenseAttackMappingsColumns,
|
||||
PrimaryKey: []*schema.Column{EpicGvgDefenseAttackMappingsColumns[0]},
|
||||
// EpicGvgDefenseAttackMappingTable holds the schema information for the "epic_gvg_defense_attack_mapping" table.
|
||||
EpicGvgDefenseAttackMappingTable = &schema.Table{
|
||||
Name: "epic_gvg_defense_attack_mapping",
|
||||
Columns: EpicGvgDefenseAttackMappingColumns,
|
||||
PrimaryKey: []*schema.Column{EpicGvgDefenseAttackMappingColumns[0]},
|
||||
}
|
||||
// EpicGvgDefenseTeamsColumns holds the columns for the "epic_gvg_defense_teams" table.
|
||||
EpicGvgDefenseTeamsColumns = []*schema.Column{
|
||||
@@ -86,8 +87,8 @@ var (
|
||||
Columns: EpicGvgDefenseTeamsColumns,
|
||||
PrimaryKey: []*schema.Column{EpicGvgDefenseTeamsColumns[0]},
|
||||
}
|
||||
// EpicHeroInfosColumns holds the columns for the "epic_hero_infos" table.
|
||||
EpicHeroInfosColumns = []*schema.Column{
|
||||
// EpicHeroInfoColumns holds the columns for the "epic_hero_info" table.
|
||||
EpicHeroInfoColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "hero_name", Type: field.TypeString, Size: 255},
|
||||
{Name: "hero_code", Type: field.TypeString, Size: 255},
|
||||
@@ -108,14 +109,14 @@ var (
|
||||
{Name: "content_json_set", Type: field.TypeString, Size: 255},
|
||||
{Name: "update_time_set", Type: field.TypeTime, Nullable: true},
|
||||
}
|
||||
// EpicHeroInfosTable holds the schema information for the "epic_hero_infos" table.
|
||||
EpicHeroInfosTable = &schema.Table{
|
||||
Name: "epic_hero_infos",
|
||||
Columns: EpicHeroInfosColumns,
|
||||
PrimaryKey: []*schema.Column{EpicHeroInfosColumns[0]},
|
||||
// EpicHeroInfoTable holds the schema information for the "epic_hero_info" table.
|
||||
EpicHeroInfoTable = &schema.Table{
|
||||
Name: "epic_hero_info",
|
||||
Columns: EpicHeroInfoColumns,
|
||||
PrimaryKey: []*schema.Column{EpicHeroInfoColumns[0]},
|
||||
}
|
||||
// EpicHeroUserBuildsColumns holds the columns for the "epic_hero_user_builds" table.
|
||||
EpicHeroUserBuildsColumns = []*schema.Column{
|
||||
// EpicHeroUserBuildColumns holds the columns for the "epic_hero_user_build" table.
|
||||
EpicHeroUserBuildColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "artifact_code", Type: field.TypeString, Size: 255},
|
||||
{Name: "hero_code", Type: field.TypeString, Size: 255},
|
||||
@@ -128,11 +129,11 @@ var (
|
||||
{Name: "update_time", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "deleted", Type: field.TypeBool},
|
||||
}
|
||||
// EpicHeroUserBuildsTable holds the schema information for the "epic_hero_user_builds" table.
|
||||
EpicHeroUserBuildsTable = &schema.Table{
|
||||
Name: "epic_hero_user_builds",
|
||||
Columns: EpicHeroUserBuildsColumns,
|
||||
PrimaryKey: []*schema.Column{EpicHeroUserBuildsColumns[0]},
|
||||
// EpicHeroUserBuildTable holds the schema information for the "epic_hero_user_build" table.
|
||||
EpicHeroUserBuildTable = &schema.Table{
|
||||
Name: "epic_hero_user_build",
|
||||
Columns: EpicHeroUserBuildColumns,
|
||||
PrimaryKey: []*schema.Column{EpicHeroUserBuildColumns[0]},
|
||||
}
|
||||
// EpicI18nMappingsColumns holds the columns for the "epic_i18n_mappings" table.
|
||||
EpicI18nMappingsColumns = []*schema.Column{
|
||||
@@ -155,8 +156,8 @@ var (
|
||||
Columns: EpicI18nMappingsColumns,
|
||||
PrimaryKey: []*schema.Column{EpicI18nMappingsColumns[0]},
|
||||
}
|
||||
// FribbleHeroSetsColumns holds the columns for the "fribble_hero_sets" table.
|
||||
FribbleHeroSetsColumns = []*schema.Column{
|
||||
// FribbleHeroSetColumns holds the columns for the "fribble_hero_set" table.
|
||||
FribbleHeroSetColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "hero_code", Type: field.TypeString, Size: 255},
|
||||
{Name: "json_content", Type: field.TypeString, Size: 255},
|
||||
@@ -168,14 +169,14 @@ var (
|
||||
{Name: "deleted", Type: field.TypeBool},
|
||||
{Name: "success_get", Type: field.TypeInt},
|
||||
}
|
||||
// FribbleHeroSetsTable holds the schema information for the "fribble_hero_sets" table.
|
||||
FribbleHeroSetsTable = &schema.Table{
|
||||
Name: "fribble_hero_sets",
|
||||
Columns: FribbleHeroSetsColumns,
|
||||
PrimaryKey: []*schema.Column{FribbleHeroSetsColumns[0]},
|
||||
// FribbleHeroSetTable holds the schema information for the "fribble_hero_set" table.
|
||||
FribbleHeroSetTable = &schema.Table{
|
||||
Name: "fribble_hero_set",
|
||||
Columns: FribbleHeroSetColumns,
|
||||
PrimaryKey: []*schema.Column{FribbleHeroSetColumns[0]},
|
||||
}
|
||||
// GearSetInfosColumns holds the columns for the "gear_set_infos" table.
|
||||
GearSetInfosColumns = []*schema.Column{
|
||||
// GearSetInfoColumns holds the columns for the "gear_set_info" table.
|
||||
GearSetInfoColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt64, Increment: true},
|
||||
{Name: "level", Type: field.TypeInt},
|
||||
{Name: "gear_id", Type: field.TypeInt64},
|
||||
@@ -200,25 +201,52 @@ var (
|
||||
{Name: "deleted", Type: field.TypeBool},
|
||||
{Name: "tenant_id", Type: field.TypeInt64},
|
||||
}
|
||||
// GearSetInfosTable holds the schema information for the "gear_set_infos" table.
|
||||
GearSetInfosTable = &schema.Table{
|
||||
Name: "gear_set_infos",
|
||||
Columns: GearSetInfosColumns,
|
||||
PrimaryKey: []*schema.Column{GearSetInfosColumns[0]},
|
||||
// GearSetInfoTable holds the schema information for the "gear_set_info" table.
|
||||
GearSetInfoTable = &schema.Table{
|
||||
Name: "gear_set_info",
|
||||
Columns: GearSetInfoColumns,
|
||||
PrimaryKey: []*schema.Column{GearSetInfoColumns[0]},
|
||||
}
|
||||
// Tables holds all the tables in the schema.
|
||||
Tables = []*schema.Table{
|
||||
EpicArtifactInfosTable,
|
||||
EpicArtifactInfoTable,
|
||||
EpicGvgAttackTeamsTable,
|
||||
EpicGvgDefenseAttackMappingsTable,
|
||||
EpicGvgDefenseAttackMappingTable,
|
||||
EpicGvgDefenseTeamsTable,
|
||||
EpicHeroInfosTable,
|
||||
EpicHeroUserBuildsTable,
|
||||
EpicHeroInfoTable,
|
||||
EpicHeroUserBuildTable,
|
||||
EpicI18nMappingsTable,
|
||||
FribbleHeroSetsTable,
|
||||
GearSetInfosTable,
|
||||
FribbleHeroSetTable,
|
||||
GearSetInfoTable,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
EpicArtifactInfoTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_artifact_info",
|
||||
}
|
||||
EpicGvgAttackTeamsTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_gvg_attack_teams",
|
||||
}
|
||||
EpicGvgDefenseAttackMappingTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_gvg_defense_attack_mapping",
|
||||
}
|
||||
EpicGvgDefenseTeamsTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_gvg_defense_teams",
|
||||
}
|
||||
EpicHeroInfoTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_hero_info",
|
||||
}
|
||||
EpicHeroUserBuildTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_hero_user_build",
|
||||
}
|
||||
EpicI18nMappingsTable.Annotation = &entsql.Annotation{
|
||||
Table: "epic_i18n_mappings",
|
||||
}
|
||||
FribbleHeroSetTable.Annotation = &entsql.Annotation{
|
||||
Table: "fribble_hero_set",
|
||||
}
|
||||
GearSetInfoTable.Annotation = &entsql.Annotation{
|
||||
Table: "gear_set_info",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user