@nest-boot/mikro-orm-hash
Functions
HashedProperty()
function HashedProperty<T>(options?): PropertyDecorator;
Defined in: hashed-property.decorator.ts:28
Decorator that marks a property as a hashed field. The property value will be automatically hashed before create and update operations.
Type Parameters
| Type Parameter |
|---|
T extends object |
Parameters
| Parameter | Type |
|---|---|
options? | Partial<PropertyOptions<T>> |
Returns
PropertyDecorator
Example
import { Entity } from '@mikro-orm/core';
import { HashedProperty } from '@nest-boot/mikro-orm-hash';
@Entity()
export class User {
@HashedProperty({ type: t.string })
password!: string;
}