-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Daniel Wagner edited this page Jun 24, 2022
·
10 revisions
// Collection
"gameData": {
//Document
"(reference) collection/games/doc/gameId": {
// Collection
"actions": {
// Document
"actionId": {
"teamId":(reference) collection/teams/doc/{teamId},
"gameId":(reference) collection/games/doc/{gameId},
"playerId":(reference) collection/players/doc/{playerId},
"type":(string) "attack" or "defense",
"actionType":(string) i.e. "goal",
"throwLocation":(string) i.e. "sector 3 and not in 6m and not in 9m",
"timestamp":(number) unix time i.e. 1653904889704,
"relativeTime": (number) seconds since game start
}
...
}
}
...
}
}
// Collection
"players"{
// Document
"playerId"{
"firstName": (string) i.e. "Tobias",
"lastName": (string) i.e. "Buck",
"nickName": (string) i.e. "Toby",
"club": (reference) collection/teams/doc/{clubId},
"teams": (array) [(string) i.e. "teams/{teamId}"],
"games": (array) [ (reference) collection/games/{gameId}, ...]
"positions": (array) [ (string) position_a, ...],
"number": (number) i.e. 11
}
...
}
// Collection
"teams"{
// Document
"teamId"{
"clubId": (reference) collection/clubs/doc/{clubId},
"name": (string) i.e. "A Jugend",
"players": (array) [ (reference) /players/{playerId}, ...],
"onFieldPlayers": (array) [ (reference) /players/{playerId}, ...],
"type": (string) "men" or "women" or "youth"
}
...
}
// Collection
"games"{
// Document
"gameId"{
"date": date,
"club": clubId,
"starttime": unix timestamp,
"stoptime": unix timestamp,
"score":number,
"scoreOpponent":number,
"players": (array) [(string) playerId_a, (string) playeId_b, ...]
}
...
}
- https://firebase.google.com/docs/firestore/data-model
- https://firebase.google.com/docs/firestore/manage-data/add-data
- https://firebase.google.com/docs/firestore/query-data/queries
- https://firebase.google.com/docs/database/flutter/structure-data
- https://proandroiddev.com/working-with-firestore-building-a-simple-database-model-79a5ce2692cb
This sidebar is customized. You can add new pages here by clicking 'Edit sidebar' above. To see all pages that exist in the Wiki click here
Ef Score
Firebase
UI
Figma Screens
Flutter
- Dashboard
- Start Game Screen
- Authentication Screen
- App Settings
- Class Model and Data
- Feed
- First Steps
- Helper Screen
- Settings Screen
- State Management
- Testing
- String Management
- Helpers