NestJS newbie here. Just started messing around with it (but been coding a long, long, long time. . . .)
I am looking to define a class dynamically. That is, I'd like to define its fields, types, and validations in some type of database (e.g. a JSON file) that gets loaded at runtime.
Is there a pattern or example of something like this for NestJS? I am planning on persisting data to MongoDB or similar, so I don't need to worry about the database schema as a part of this.
Essentially I'm trying to create an "Entity Engine" where the definition of what Entities are available and their properties are defined elsewhere and interpreted at runtime.