{
"fields": {
"name": {
"type": "varchar",
"required": true,
"trim": true,
"isMultilang": true
},
"unit": {
"type": "varchar",
"required": true,
"trim": true,
"isMultilang": true
},
"products": {
"type": "linkMultiple"
},
"createdAt": {
"type": "datetime",
"readOnly": true
},
"modifiedAt": {
"type": "datetime",
"readOnly": true
},
"createdBy": {
"type": "link",
"readOnly": true,
"view": "views/fields/user"
},
"modifiedBy": {
"type": "link",
"readOnly": true,
"view": "views/fields/user"
},
"ownerUser": {
"type": "link",
"required": true,
"view": "views/fields/owner-user"
},
"assignedUser": {
"type": "link",
"required": true,
"view": "views/fields/assigned-user"
},
"teams": {
"type": "linkMultiple",
"view": "views/fields/teams"
}
},
"links": {
"products": {
"type": "hasMany",
"foreign": "measuringUnit",
"entity": "Product"
},
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"ownerUser": {
"type": "belongsTo",
"entity": "User"
},
"assignedUser": {
"type": "belongsTo",
"entity": "User"
},
"teams": {
"type": "hasMany",
"entity": "Team",
"relationName": "EntityTeam",
"layoutRelationshipsDisabled": true
}
},
"collection": {
"sortBy": "createdAt",
"asc": false
},
"indexes": {
"ownerUser": {
"columns": [
"ownerUserId",
"deleted"
]
},
"assignedUser": {
"columns": [
"assignedUserId",
"deleted"
]
}
}
}
|