Institute Model
Business Purpose: Represents an educational institution that will use the platform. It stores details like the institute's name, branding, contact information, and payment gateway configuration. This is the central model to which most other data in this module will be linked.
Fields:
| Field Name | Type | Description |
|---|---|---|
instituteName | shortText | The official name of the institute. Marked as the user key. |
logo | mediaSingle | The institute's logo for branding. |
description | longText | A brief description of the institute. |
paymentGatewayMerchantId | shortText | Merchant ID for the payment gateway. |
paymentGatewayAccessKey | shortText | Access key for the payment gateway. |
paymentGatewayAccessSecret | shortText | Secret key for the payment gateway. |
instituteAddress | longText | The physical address of the institute. |
feeTypes | relation | One-to-many relationship with Fee Types. |
instituteUsers | relation | One-to-many relationship with Institute Users. |
instituteBrochure | mediaSingle | A brochure or informational document. |
instituteIntroVideo | mediaSingle | An introductory video for the institute. |
supportEmail | shortText | Email address for support queries. |
supportMobile | shortText | Mobile number for support queries. |
gst | shortText | GST number of the institute. |
tnC | richText | Terms and Conditions for the institute. |
faqs | richText | Frequently Asked Questions. |
privacyPolicy | richText | The institute's privacy policy. |
emailDomain | shortText | The official email domain of the institute. |
custUserId | shortText | Customer User ID for the institute. |
Key Fields Explained
-
instituteName(User Key): This field is marked as the "User Key" (isUserKey: true). This means it's the primary human-readable identifier for an institute record. It must be unique. -
paymentGateway...fields: These fields store the credentials for the institute's specific payment gateway account. This allows the platform to process payments on behalf of each institute securely. -
feeTypes&instituteUsers(Inverse Relations): These fields represent the "one-to-many" side of a relationship. It's important to understand that you do not create these fields directly on theInstitutemodel. Instead, they are automatically generated by SolidX.When you create the
FeeTypeandInstituteUsermodels later in this tutorial, you will define amany-to-onerelationship from them to theInstitutemodel. By enabling therelationCreateInverseoption on those fields, you instruct SolidX to automatically add the correspondingfeeTypes(a list ofFeeTyperecords) andinstituteUsers(a list ofInstituteUserrecords) fields to thisInstitutemodel. This creates a bi-directional link, allowing you to easily navigate from an institute to all its associated fee types or users, and vice-versa.
Creation Steps
If you are following the manual "Guided Tour", follow these steps to create the Institute model in the App Builder.
- Navigate to Fees Portal > App Builder > Model and click Add.
- Fill in the primary details for the model:
- Singular Name:
institute - Plural Name:
institutes - Display Name:
Institute
- Singular Name:
- Go to the Fields tab.
- Click Add Field and create each field exactly as defined in the table above. Pay close attention to the Field Name and Type.
- Click Save.
Tip After you have created all the models for this module, you will need to run the code generation step again to create the files for them.
For the Fast Track: Model Metadata The JSON block below contains the complete metadata definition for the Institute model.
This definition is structured with top-level properties for the model itself (like
singularName,pluralName,tableName) and afieldsarray that defines every attribute you see in the table above.You can use this metadata as part of the "Fast Track" approach by including it in the main
fees-portal-metadata.jsonfile.
{
"singularName": "institute",
"pluralName": "institutes",
"displayName": "Institute",
"description": "The institute name...",
"dataSource": "default",
"dataSourceType": "postgres",
"tableName": "fees_portal_institute",
"userKeyFieldUserKey": "instituteName",
"isChild": false,
"enableAuditTracking": true,
"enableSoftDelete": false,
"draftPublishWorkflow": false,
"internationalisation": false,
"fields": [
{
"name": "instituteName",
"displayName": "Institute Name",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": true,
"index": true,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": true,
"enableAuditTracking": true
},
{
"name": "logo",
"displayName": "Logo",
"description": null,
"type": "mediaSingle",
"ormType": "varchar",
"isSystem": false,
"mediaTypes": [
"image"
],
"mediaMaxSizeKb": 5120,
"required": true,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"mediaStorageProviderUserKey": "default-aws-s3"
},
{
"name": "description",
"displayName": "Description",
"description": null,
"type": "longText",
"ormType": "text",
"isSystem": false,
"regexPattern": "",
"regexPatternNotMatchingErrorMsg": "",
"defaultValue": null,
"min": null,
"max": null,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null
},
{
"name": "paymentGatewayMerchantId",
"displayName": "Cust Code",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": true,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "paymentGatewayAccessKey",
"displayName": "Access Key",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": true,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "paymentGatewayAccessSecret",
"displayName": "Access Secret",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "instituteAddress",
"displayName": "Institute Address",
"description": null,
"type": "longText",
"ormType": "text",
"isSystem": false,
"regexPattern": "",
"regexPatternNotMatchingErrorMsg": "",
"defaultValue": null,
"min": null,
"max": null,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null
},
{
"name": "instituteBrochure",
"displayName": "Institute Brochure",
"description": null,
"type": "mediaSingle",
"ormType": "varchar",
"isSystem": false,
"mediaTypes": [
"file"
],
"mediaMaxSizeKb": 5120,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"mediaStorageProviderUserKey": "default-aws-s3"
},
{
"name": "instituteIntroVideo",
"displayName": "Institute Intro Video",
"description": null,
"type": "mediaSingle",
"ormType": "varchar",
"isSystem": false,
"mediaTypes": [
"video"
],
"mediaMaxSizeKb": 5120,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"mediaStorageProviderUserKey": "default-filesystem"
},
{
"name": "supportEmail",
"displayName": "Support Email",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "supportMobile",
"displayName": "Support Mobile",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": 10,
"max": 10,
"required": true,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "gst",
"displayName": "GST",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "tnC",
"displayName": "Terms and Conditions",
"description": null,
"type": "richText",
"ormType": "text",
"isSystem": false,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null
},
{
"name": "faqs",
"displayName": "FAQS",
"description": null,
"type": "richText",
"ormType": "text",
"isSystem": false,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null
},
{
"name": "privacyPolicy",
"displayName": "Privacy Policy",
"description": null,
"type": "richText",
"ormType": "text",
"isSystem": false,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null
},
{
"name": "emailDomain",
"displayName": "Email Domain",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": false,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": true
},
{
"name": "custUserId",
"displayName": "Cust UserID",
"description": null,
"type": "shortText",
"ormType": "varchar",
"isSystem": false,
"defaultValue": null,
"min": null,
"max": null,
"required": true,
"unique": false,
"index": false,
"private": false,
"encrypt": false,
"encryptionType": null,
"decryptWhen": null,
"columnName": null,
"isUserKey": false,
"enableAuditTracking": false
}
]
}