DB Schema

DB Schema

Onboarding Table Properties

  • 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.

Onboarding Slide Table Properties

  • 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.

Slide example

Multiple Onboardings

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:

export enum OnboardingType {
  'APP_ONBOARDING' = 'APP_ONBOARDING',
  'MARKETING_ONBOARDING' = 'MARKETING_ONBOARDING',
}
Figure 1

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.

Figure 2

If you modify onboarding 1 as active, onboarding 3 would become inactive.

Last updated

Was this helpful?