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

Front-end

The front-end framework the application will use.

Database

The database the application will use on the back-end.

Tenant Mode

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

Payments

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

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.

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.

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 Excel?

Exports this field on the Export to Excel process.

Text

Properties

Name

Option

Description

HTML Type

Text

Creates an input field on the form.

HTML Type

TextArea

Creates a text area field on the form.

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Min Length

The minimum length.

Max Length

The maximum length.

Integer

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Min

The minimum value.

Max

The maximum value.

Decimal

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Min

The minimum value.

Max

The maximum value.

Scale

The number of digits to the right of the decimal point.

Date

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

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Datetime

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

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Boolean

True or false.

Properties

Name

Option

Description

HTML Type

Switch

Creates a switch field on the form.

HTML Type

Checkbox

Creates a checkbox field on the form.

HTML Type

Radio

Creates a radio group with Yes or No on the form.

Enumerator

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

Properties

Name

Option

Description

Options

Comma-separated options. Those values are the ones that will be saved on the database. Labels should be defined on the Internationalization (I18n) file later. No spaces or special characters are allowed. Example: open,in_progress,closed

HTML Type

Select

Creates a select box on the form

with the options to be selected.

HTML Type

Radio

Creates a radio group with the options

to be selected.

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Enumerator (Multiple)

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

Properties

Name

Option

Description

Options

Comma-separated options. Those values are the ones that will be saved on the database. Labels should be defined on the Internationalization (I18n) file later. No spaces or special characters are allowed. Example: open,in_progress,closed

Validations

Name

Description

Required

Requires the field to be informed.

Min

The minimum selected items.

Max

The maximum selected items.

Relation to One

Relationship field between two entities. It creates an autocomplete on the form.

Relation to One means that this field will contain only one of the related entity.

Relation

Name

Description

Entity

The entity to be related to this field.

Two-way field

This is optional. In case the related entity has a field that represents this relationship too, you can relate those two fields. The selected field must be of type Relation to Many to this Entity. Two-way relationships between Relations to One <-> Relation To One are not supported by ScaffoldHub, you will have to relate them manually in the code. Read more at Two-way relationships.

Validations

Name

Description

Required

Requires the field to be informed.

Unique

The field value should be unique across the entity data.

Relation to Many

Relationship field between two entities. It creates an autocomplete on the form.

Relation to Many means that this field will contain many of the related entity.

Relation

Name

Description

Entity

The entity to be related to this field.

Two-way field

This is optional. In case the related entity has a field that represents this relationship too, you can relate those two fields. The selected field can be of both types of Relation to Many or Relation to One to this Entity. Read more at Two-way relationships.

Validations

Name

Description

Required

Requires the field to be informed.

Min

The minimum related records.

Max

The maximum related records.

Relation to User (One)

Behaves the same as the Relation to One, but instead of being related to an entity, is related to a User.

Relation to Users (Many)

Behaves the same as the Relation to Many, but instead of being related to an entity, is related to a User.

Files

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

Validations

Name

Description

Required

Requires at least one file.

Min

The minimum number of files.

Max

The maximum number of files.

Size in bytes

The maximum size of each file in bytes.

Formats

Comma-separated valid formats. Example: doc, txt, csv.

Images

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

Validations

Name

Description

Required

Require at least one image.

Min

The minimum number of images.

Max

The maximum number of images.

Size in bytes

The maximum size of each image in bytes.

Last updated