diff --git a/liquibase/changelogs/changelog-master.xml b/liquibase/changelogs/changelog-master.xml index b6ae681..3f50dd1 100644 --- a/liquibase/changelogs/changelog-master.xml +++ b/liquibase/changelogs/changelog-master.xml @@ -5,4 +5,8 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"> + + + + \ No newline at end of file diff --git a/liquibase/changelogs/changeset/create-cage.xml b/liquibase/changelogs/changeset/create-cage.xml new file mode 100644 index 0000000..a43c641 --- /dev/null +++ b/liquibase/changelogs/changeset/create-cage.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liquibase/changelogs/changeset/create-game.xml b/liquibase/changelogs/changeset/create-game.xml new file mode 100644 index 0000000..2f61417 --- /dev/null +++ b/liquibase/changelogs/changeset/create-game.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liquibase/changelogs/changeset/create-hamster.xml b/liquibase/changelogs/changeset/create-hamster.xml new file mode 100644 index 0000000..ac1aafd --- /dev/null +++ b/liquibase/changelogs/changeset/create-hamster.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liquibase/changelogs/changeset/create-server.xml b/liquibase/changelogs/changeset/create-server.xml new file mode 100644 index 0000000..79bd4cd --- /dev/null +++ b/liquibase/changelogs/changeset/create-server.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/service/game_service.go b/service/game_service.go index cfff629..b6174eb 100644 --- a/service/game_service.go +++ b/service/game_service.go @@ -1,6 +1,6 @@ package service -import "Game-tycoon/storage/dao" +import "hamster-tycoon/storage/dao" type GameService struct { serviceContext @@ -8,4 +8,4 @@ type GameService struct { func NewGameService(database dao.Database) *GameService { return &GameService{serviceContext{db: database}} -} +} \ No newline at end of file diff --git a/storage/dao/fake/database_postgresql_cages.go b/storage/dao/fake/database_fake_cages.go similarity index 100% rename from storage/dao/fake/database_postgresql_cages.go rename to storage/dao/fake/database_fake_cages.go diff --git a/storage/dao/fake/database_fake_games.go b/storage/dao/fake/database_fake_games.go new file mode 100755 index 0000000..ab59936 --- /dev/null +++ b/storage/dao/fake/database_fake_games.go @@ -0,0 +1,23 @@ +package fake + +import "hamster-tycoon/storage/model" + +func (db *DatabaseFake) GetAllGames() ([]*model.Game, error) { + return nil, nil +} + +func (db *DatabaseFake) GetGameById(string) (*model.Game, error) { + return nil, nil +} + +func (db *DatabaseFake) CreateGame(*model.Game) error { + return nil +} + +func (db *DatabaseFake) DeleteGame(string) error { + return nil +} + +func (db *DatabaseFake) UpdateGame(*model.Game) error { + return nil +} diff --git a/storage/dao/fake/database_postgresql_games.go b/storage/dao/fake/database_fake_hamsters.go similarity index 100% rename from storage/dao/fake/database_postgresql_games.go rename to storage/dao/fake/database_fake_hamsters.go diff --git a/storage/dao/fake/database_postgresql_hamsters.go b/storage/dao/fake/database_postgresql_hamsters.go deleted file mode 100755 index b665306..0000000 --- a/storage/dao/fake/database_postgresql_hamsters.go +++ /dev/null @@ -1 +0,0 @@ -package fake diff --git a/storage/dao/postgresql/database_postgresql_games.go b/storage/dao/postgresql/database_postgresql_games.go index 4e9a54a..de7d2db 100755 --- a/storage/dao/postgresql/database_postgresql_games.go +++ b/storage/dao/postgresql/database_postgresql_games.go @@ -1 +1,23 @@ package postgresql + +import "hamster-tycoon/storage/model" + +func (db *DatabasePostgreSQL) GetAllGames() ([]*model.Game, error) { + return nil, nil +} + +func (db *DatabasePostgreSQL) GetGameById(string) (*model.Game, error) { + return nil, nil +} + +func (db *DatabasePostgreSQL) CreateGame(*model.Game) error { + return nil +} + +func (db *DatabasePostgreSQL) DeleteGame(string) error { + return nil +} + +func (db *DatabasePostgreSQL) UpdateGame(*model.Game) error { + return nil +} diff --git a/storage/model/game.go b/storage/model/game.go index 2e8bce1..bbfb627 100644 --- a/storage/model/game.go +++ b/storage/model/game.go @@ -2,6 +2,7 @@ package model type Game struct { ID string `json:"game_id"` + User User `json:"-"` Server Server `json:"server"` Cages []*Cage `json:"cages"` SoldHamster []*Hamster `json:"sold_hamsters"`