Data models - WApp-Solutions/team-manager GitHub Wiki
Here we want to describe the needed data models:
- member (as base entity)
- refereeMember (extends member)
- firefighterMember (extends member)
- groups
- event
- user (for authentication and authorization)
- gender ENUM
- clothingSizes ENUM
- clothingSizeMeasures ENUM
- audit-log / metadata
The member entity represents a real person and is a unique dataset. For different purposes we'll have to create a basic data model for members and the possibility to enhance further attributes for special use-cases and scenarios. For example when using the solution in different contexts e.g. for soccer, choir or fire departments.
- id: String (unique, can be generated from firebase while pushing a new dataset)
- name: String
- firstname: String
- birthdate: String
- gender: ENUM
- street: String
- city: String
- mobile: String
- phone: String
- mail: String
- active: Boolean
- pictureUrl: String
- telegramId: String/number
- userId: String (user-id will be the unique id generated from firebase authentication)
- metadata: ENUM
- male: string
- female: string
- neutral: string
Todo: Further clarification is needed which fields/attributes are needed to be validated in the solution for consistency.
- birthdate: ISO Date String, Format: 2021-02-05T12:34:56
- mail: is a valid mail-address with @sign and domain ending ([email protected])
- league: string
- club: string
- region: string
- rank: string
- clothingSizes: ENUM
- documents: Map
- driversLicense: driversLicense
- membership: membership
- promotions: Map
- functions: Map
- trainings: Map
- respiratory: Map
- gloves: number
- shirt: clothingSizeMeasures ENUM
- shoes: number
- trousers: number
- XXS: string
- XS: string
- S: string
- M: string
- L: string
- XL: string
- XXL: string
- XXXL: string
- classB: boolean
- classC: boolean
- classFire: boolean // special class for fire dept. vehicles until 7,49t
- lastCheck: string
- entryDate: string
- currentMembership: currentMembership ENUM
- activeEntryDate: string (can be empty)
- activeLeftDate: string (can be empty)
- bambiniEntryDate: string (can be empty)
- bambiniLeftDate: string (can be empty)
- youthEntryDate: string (can be empty)
- youthLeftDate: string (can be empty)
- active: string
- bambini: string
- youth: string
- date: string
- rank: rank ENUM
- BAMBINIMITGLIED: string
- JUGENDFEUERWEHRMITGLIED: string
- FEUERWEHRMANNANWAERTER: string
- FEUERWEHRMANN: string
- OBERFEUERWEHRMANN: string
- HAUPTFEUERWEHRMANN: string
- LOESCHMEISTER: string
- OBERLOESCHMEISTER: string
- HAUPTLOESCHMEISTER: string
- BRANDMEISTER: string
- OBERBRANDMEISTER: string
- HAUPTBRANDMEISTER: string
- date: string
- title: string
- end: string
- begin: string
- end: string
- duration: number
- documentUrl: string
- location: string
- title: string || trainingTitleKey
- customTitle: true (title provided by user, not a known training from a list)
- success: boolean (default: true)
- type: respiratoryActivityType ENUM
- successful: boolean
- date: string
- expiryDate: string
- remarks: string
- roentgen: boolean
- age: number
- location: string
- responsible: string
- csa: boolean
- operationType: operationType ENUM
- G26.3 Untersuchung
- Atemschutzübungsstrecke
- Einsatzmäßige Bedingungen
- BRAND: string
- GEFAEHRLICHE_GUETER: string
Groups are representing a collection of members which can be grouped together and be assigned to an event. Groups can organize various constellations of members to manage them collectively.
- id: String (unique, can be generated from firebase while pushing a new dataset)
- name: String
- description: String
- members: Map
- owner/administrators: Map (owners or administrators - terminology tbd - also have to be part of members)
- metadata: ENUM
- members: key-value pairs key: memberId, value: true
An event can be anything that happens on a given date and has a defined start- and configurable end-date. For a simplified handling of people assignments to an event, groups can be added to it. The members will implicitly be added to the event as they are part of the groups.
- id: String (unique, can be generated from firebase while pushing a new dataset)
- title: String
- description: String
- begin: String
- end: String
- groups: Map
- host: String
- metadata: ENUM
For better auditing and transparency some metadata will be added to the entities to keep track of the following information.
- createdAt: String
- createdBy: String
- updatedAt: String
- updatedBy: String