mirror of
https://github.com/movie-web/backend.git
synced 2025-09-13 18:13:26 +00:00
@@ -1,4 +1,11 @@
|
|||||||
import { Entity, Index, PrimaryKey, Property, types } from '@mikro-orm/core';
|
import {
|
||||||
|
Entity,
|
||||||
|
Index,
|
||||||
|
PrimaryKey,
|
||||||
|
Property,
|
||||||
|
Unique,
|
||||||
|
types,
|
||||||
|
} from '@mikro-orm/core';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
|
|
||||||
export type UserProfile = {
|
export type UserProfile = {
|
||||||
@@ -13,7 +20,7 @@ export class User {
|
|||||||
id: string = nanoid(12);
|
id: string = nanoid(12);
|
||||||
|
|
||||||
@Property({ name: 'public_key', type: 'text' })
|
@Property({ name: 'public_key', type: 'text' })
|
||||||
@Index()
|
@Unique()
|
||||||
publicKey!: string;
|
publicKey!: string;
|
||||||
|
|
||||||
@Property({ name: 'namespace' })
|
@Property({ name: 'namespace' })
|
||||||
|
Reference in New Issue
Block a user