DB Schema
Last updated
Last updated
name: onboarding name.
slug: text string automatically generated from the name by which the record will be searched in the database.
enabled: this field indicates if the onboarding is active.
type: type of onboarding which you want to create.
created_at: date the record was created.
updated_at: date the record was last modified.
title: slide title.
content: text you want to display on the slide.
image: image you want to display on the slide.
index: slide position (through this field, you can change the order of the slides).
onboarding_id: onboarding ID to which the slide belongs to.
created_at: date the record was created.
updated_at: date the record was last modified.
Through this structure we can have different types of onboardings in our application, but we can only have 1 active onboarding for each type.
Onboarding types can be modified or added in the file src/contents/onboarding/enums/onboarding-type.enum.tsim
. Example:
In figure 1, we can see that there is onboarding 1 and onboarding 2; both are of different types and both are active, so that any user can see their content. But if you create a new onboarding 3 of type APP_ONBOARDING
(shown on figure 2), then onboarding 1 passes the enabled field to a false
value, since only 1 active onboarding per type is allowed.
If you modify onboarding 1 as active, onboarding 3 would become inactive.