ForeignKey<T>:T extends null | undefined ? T : T & { [ForeignKeyBrand]?: true; }
This is a Branded Type.
You can use it to tag fields from your class that are foreign keys.
They will become optional in init (as foreign keys are added by association methods, like hasMany.
This is a Branded Type. You can use it to tag fields from your class that are foreign keys. They will become optional in init (as foreign keys are added by association methods, like hasMany.