ADD: added team management

This commit is contained in:
hwinkel
2025-11-28 14:31:12 +01:00
parent 3a6c3a86e3
commit aac5a3c21d
14 changed files with 587 additions and 166 deletions

View File

@@ -6,6 +6,7 @@ import (
"log"
"volleyball/internal/player"
"volleyball/internal/team"
_ "github.com/lib/pq" // Import the PostgreSQL driver
)
@@ -54,6 +55,8 @@ func CheckIfTablesExist(db *sql.DB) (bool, error) {
func InitTables(d *sql.DB) error {
CreateOrUpdateTablePG(d, "users", player.User{})
CreateOrUpdateTablePG(d, "roles", player.Roles{})
createTable(d, "teams", team.Team{})
createTable(d, "teams_player", team.TeamPlayerAssociation{})
tables := []string{
// player.PlayerTable,