Modeling

ScaffoldHub offers an online modeling tool so you can model the entities, fields, relationships, and validations of your application.

Toolbar

New

The new option will clear the current project and start a new one.

Save

The save option will download a JSON file on your machine with the project configuration.

Load

The load option will allow you to select a previously downloaded JSON file and load it to the modeling tool.

Sample

The sample option loads a sample application project on the modeling tool.

Version

The version select box allows you to change the scaffold version.

Properties

Tenant Mode

The tenant mode the application will use. Read more at Features > Tenants.

Subscriptions/Payments

Defines if the payments for plans will be enabled. Read more at Features > Subscriptions and Payments.

Include E2E and Unit Tests

Defines the codebase will include E2E and Unit Tests. Read more at Features > End-to-end and Unit Tests.

Default Language

Defines the default language for the application.

Entities

Each entity will have its own menu, permissions, form, listing, import, and export.

Basic

Name

The variable name that will refer to this entity inside the code. It follows the javascript variable naming rules.

Name Pural

The variable name that will refer to this entity inside the code in the plural format. It follows the javascript variable naming rules.

Label

The label used for the menu and pages to refer to this entity.

Label Plural

On the pages that the entity is referred to in the plural format - like on the listing page - this label will be used.

Properties

Label

The field that will be used as the label on the autocomplete related to this entity.

Audit Fields on List?

Flag that indicates if the listing page will include Created By, Created At, Updated By and Updated At fields.

Fields

Fields are the attributes of each entity.

Name

The variable name that will refer to this field inside the code. It follows the javascript variable naming rules.

Label

The label used to refer to this field on the pages.

Type

The type of this field. Each type will be described in detail later.

Common Properties

Those properties are common across all the field types.

Placeholder

The placeholder that will be displayed on the form for this field.

Hint

The hint that will be displed on the form for this field.

List

Displays the field on the listing page.

Filter

Creates a filter for this field on the listing page.

Export to CSV?

Exports this field on the Export to CSV process.

String/Text

Properties

Validations

Integer

Validations

Decimal

Validations

Date

Date without time. Is displayed in the format YYYY-MM-DD and saved as a string on the database.

Validations

Datetime

Date and time. Is displayed in the format YYYY-MM-DD HH:mm and saved as date and time at the database.

Validations

Boolean

True or false.

Properties

Enumerator

An enumerator is a field that must be set based on a list of options.

Properties

Validations

Enumerator (Multiple)

An enumerator (multiple) allows you to select several items from a list of options.

Properties

Validations

Files

Creates a File Upload field on the form, and a file list on the show pages.

Validations

Images

Creates an Image File Upload field on the form, and an image gallery on the show pages.‌

Validations

JSON

Creates a JSON field in the database and a text area on the form to add it.

Validations

Relationships

Relationships are relations between entities.

Many to Many

Many-to-many relates many records to many others. Example: Categories (Many) <-> Posts (Many).

Side A and Side B

In a many to many relationship, both sides will have the same configuration.

Many to One

Relates many records to one. Example: Posts (Many) <-> Author (One).

Side A

The Side A is the side that relates to one. In the example, it would be the Posts.

Side B

The Side B is the side that relates to many. In the example, it would be the Author.

One to One

Relates one record to another. Example: Profile (One - has Foreign Key) <-> User (one).

Side A

The Side A is the side that relates to one record and contains the foreign key. It's marked as unique, to prevent Side B from having multiple of it.

Side B

The Side B relates to one record.

Properties

Notes: The Side B is the only side that can contain a Membership. Memberships are not editable by the modeling tool, so they just related to a Side A and are not editable.

Last updated