Remove custom table names as ent uses sensible defaults

The only consequence is renaming option to choice
This commit is contained in:
Vojtěch Káně
2021-04-21 12:06:10 +02:00
parent ea24ed2f1d
commit 52f2e238e1
7 changed files with 0 additions and 42 deletions

View File

@@ -34,9 +34,3 @@ func (Answer) Edges() []ent.Edge {
Required(), Required(),
} }
} }
func (Answer) Config() ent.Config {
return ent.Config{
Table: "answers",
}
}

View File

@@ -35,9 +35,3 @@ func (AskedQuestion) Edges() []ent.Edge {
Required(), Required(),
} }
} }
func (AskedQuestion) Config() ent.Config {
return ent.Config{
Table: "asked_questions",
}
}

View File

@@ -32,9 +32,3 @@ func (Choice) Edges() []ent.Edge {
edge.To("answers", Answer.Type), edge.To("answers", Answer.Type),
} }
} }
func (Choice) Config() ent.Config {
return ent.Config{
Table: "options",
}
}

View File

@@ -27,9 +27,3 @@ func (Game) Edges() []ent.Edge {
edge.To("questions", Question.Type), edge.To("questions", Question.Type),
} }
} }
func (Game) Config() ent.Config {
return ent.Config{
Table: "games",
}
}

View File

@@ -37,9 +37,3 @@ func (Player) Edges() []ent.Edge {
edge.To("answers", Answer.Type), edge.To("answers", Answer.Type),
} }
} }
func (Player) Config() ent.Config {
return ent.Config{
Table: "players",
}
}

View File

@@ -37,9 +37,3 @@ func (Question) Edges() []ent.Edge {
edge.To("asked", AskedQuestion.Type), edge.To("asked", AskedQuestion.Type),
} }
} }
func (Question) Config() ent.Config {
return ent.Config{
Table: "questions",
}
}

View File

@@ -34,9 +34,3 @@ func (Session) Edges() []ent.Edge {
edge.To("askedQuestions", AskedQuestion.Type), edge.To("askedQuestions", AskedQuestion.Type),
} }
} }
func (Session) Config() ent.Config {
return ent.Config{
Table: "sessions",
}
}