Members Sign-in
singularName: member-sign-inpluralName: members-sign-ins
Holds the members runrecords, i.e., the relationship between a member and all runs he/she attended
Schema
| Name | Type | Details |
|---|---|---|
| run | relation | manyToOne → Hareline |
| member | relation | manyToOne → Members |
| sign_in | boolean | |
| idem_member | relation | oneToOne → idem-member |
Lifecycles
beforeCreate (async)
Lifecycle method triggered before creating a new member sign-in entry. It checks whether a member is already signed in for a specific run to prevent duplicate entries. If an entry already exists for the given member and run, it throws an ApplicationError.
Parameters:
event: - The event object containing the parameters for the new member sign-in entry.
afterCreate (async)
Lifecycle method triggered after creating a new member sign-in entry. It creates a corresponding run record for the member and run associated with the sign-in.
Parameters:
event: - The event object containing the newly created member sign-in entry.
beforeDelete (async)
Lifecycle method triggered before deleting a member sign-in entry. It retrieves the associated member and run details and stores the entity state for use in subsequent lifecycle events.
Parameters:
event: - The event object containing parameters and state.
afterDelete (async)
Lifecycle method triggered after deleting a member sign-in entry. It deletes the associated run record from the run records collection.
Parameters:
event: - The event object containing parameters and state from the deletion process. It includes the entity that was deleted, which contains references to the member and run.
