Here is the part of the .forestadmin-schema.json file related to “department teams”
{
"name": "department_teams",
"nameOld": "department_teams",
"icon": null,
"integration": null,
"isReadOnly": false,
"isSearchable": true,
"isVirtual": false,
"onlyForRelationships": false,
"paginationType": "page",
"fields": [{
"field": "code",
"type": "String",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "createdAt",
"type": "Date",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "createdBy",
"type": "String",
"defaultValue": {
"val": "CURRENT_USER"
},
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "id",
"type": "Number",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "name",
"type": "String",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "updatedAt",
"type": "Date",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "updatedBy",
"type": "String",
"defaultValue": {
"val": "CURRENT_USER"
},
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}, {
"field": "uuid",
"type": "String",
"defaultValue": null,
"enums": null,
"integration": null,
"isFilterable": true,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"isVirtual": false,
"reference": null,
"inverseOf": null,
"validations": []
}],
"segments": [],
"actions": []
}
The forest/department-teams.js is:
const { collection } = require('forest-express-sequelize');
// This file allows you to add to your Forest UI:
// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions
// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields
// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship
// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments
collection('department_teams', {
actions: [],
fields: [],
segments: [],
});