-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
3 - M (<= 1 month)
-
1839
-
Not Needed
So i read the doc but it didnt help,
What i have is a base model which has some common fields and i want to inherit those in my all other models.
My Base Model:
class Base { } Base.schema = { name: 'Base', properties: { uuid: { type: 'string', optional: false }, created_by: { type: 'string', optional: false }, } };
My Other Model:
class Student { } Student.schema = { name: 'Student', properties: { name: { type: 'string', optional: false }, age: { type: 'int', optional: true } ... } };
Result i want when i create a record:
{ uuid: 'xxx-xxx-xxx-xxx-xxx' created_by: 'xxx-xxx-xxx-xxx-xxx' name: 'Smith' age: 20 ... }