forked from pathwar/pathwar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request pathwar#48 from pathwar/dev/moul/all-models
feat: define all models
- Loading branch information
Showing
14 changed files
with
5,768 additions
and
1,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.circleci/ | ||
test/ | ||
.git/ | ||
*~ | ||
.#* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,49 @@ | ||
package entity | ||
|
||
func ByName(name string) interface{} { | ||
return AllMap()[name] | ||
} | ||
|
||
func AllMap() map[string]interface{} { | ||
return map[string]interface{}{ | ||
"Achievement": Achievement{}, | ||
"Coupon": Coupon{}, | ||
"Event": Event{}, | ||
"Hypervisor": Hypervisor{}, | ||
"LevelFlavor": LevelFlavor{}, | ||
"LevelInstance": LevelInstance{}, | ||
"LevelSubscription": LevelSubscription{}, | ||
"Level": Level{}, | ||
"Notification": Notification{}, | ||
"ShopItem": ShopItem{}, | ||
"TeamMember": TeamMember{}, | ||
"Team": Team{}, | ||
"TournamentTeam": TournamentTeam{}, | ||
"Tournament": Tournament{}, | ||
"UserSession": UserSession{}, | ||
"User": User{}, | ||
"WhoswhoAttempt": WhoswhoAttempt{}, | ||
} | ||
} | ||
|
||
func All() []interface{} { | ||
return []interface{}{ | ||
Achievement{}, | ||
Coupon{}, | ||
Event{}, | ||
Hypervisor{}, | ||
LevelFlavor{}, | ||
LevelInstance{}, | ||
LevelSubscription{}, | ||
Level{}, | ||
UserSession{}, | ||
User{}, | ||
Notification{}, | ||
ShopItem{}, | ||
TeamMember{}, | ||
Team{}, | ||
TournamentTeam{}, | ||
Tournament{}, | ||
UserSession{}, | ||
User{}, | ||
WhoswhoAttempt{}, | ||
} | ||
} |
Oops, something went wrong.