Skip to content

Commit

Permalink
Добавит декоратор
Browse files Browse the repository at this point in the history
  • Loading branch information
AdonaiJehosua committed Sep 5, 2024
1 parent 4fc463c commit 78a6e27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shared/modules/user/user.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {setLogLevel, defaultClasses, getModelForClass, modelOptions} from '@typegoose/typegoose';
import {setLogLevel, defaultClasses, getModelForClass, modelOptions, prop} from '@typegoose/typegoose';
import { User } from '../../types/index.js';
import {createSHA256} from '../../helpers/index.js';

Expand All @@ -16,6 +16,8 @@ export interface UserEntity extends defaultClasses.Base {}
})
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class UserEntity extends defaultClasses.TimeStamps implements User {

@prop({unique: true, default: ''})
public name: string;

public avatarUrl: string;
Expand Down

0 comments on commit 78a6e27

Please sign in to comment.