Mark a model field so its value is automatically hashed before INSERT/UPDATE.
This is a class decorator factory — pass the field name(s):
@SecureField('password')
@SecureField('pin', { algorithm: 'bcrypt', adapter: myAdapter })
class User extends Model { ... }
The ORM will call hashSecureFields(instance) in a beforeCreate / beforeUpdate hook to encrypt the field before it reaches the database.
TypeScript Decorators / Annotations for ts-prorm-orm
Exports all decorator utilities organized by category:
Encryption —
Secure
/
Secure Field
for password hashing Procedures —
Procedure
/
Sql Function
for stored procedures & SQL functions Views —
View
for mapping a Model class to a database view Permissions —
Can View
/
Cannot View
/
Permission
/
Can Write
/
Cannot Write