Please forgive my lack of knowledge in computer terminology:
In my Mongo app, I aim to establish a defined structure for each document type. This structure will include constraints, validation patterns, and access roles for viewing, modifying, and deleting the document.
For instance, let's take a Book
:
{
name: "Book",
viewRoles: ["Admin","User"],
createRoles: ["Admin"],
modifyRoles: ["Admin", "User"],
fields: [
{
id:"title",
name:"Book Title",
validation: "",
maxLength: 50,
minLength: 3,
required: true
},
{
id:"authorEmail",
name:"Email of the Author",
validation: "email",
maxLength: 50,
minLength: 3,
required: false
}
]
}
By applying this 'schema' to all documents, I can have a unified interface for creating, modifying, and displaying these 'entities'.
Furthermore, I wish to enable the creation of new document types and the ability to adjust their fields via the admin panel of my application.
Searching for terms like "mongo dynamic schema" or "mongo document meta design" yields unhelpful results.
My inquiry is about the terminology used when implementing a predefined schema for documents with the option to modify it. Where can I find more information on designing such systems?