add index to tables

This commit is contained in:
2026-04-09 09:31:20 +03:30
parent 8f6dbc17d3
commit 36d231eb0d
12 changed files with 25 additions and 13 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import {
ManyToOne,
Property,
OptionalProps,
Index,
} from '@mikro-orm/core';
import { User } from "../../user/entities/user.entity";
import { Admin } from 'src/modules/admin/entities/admin.entity';
@@ -10,10 +11,10 @@ import { AttachmentType } from '../interfaces/chat';
import { BaseEntity } from 'src/common/entities/base.entity';
@Entity()
@Index({ properties: ['user'] })
export class Chat extends BaseEntity {
[OptionalProps]?: 'createdAt' | 'deletedAt'
@Property({ type: 'text' })
content: string;