Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 499 Bytes

photos.md

File metadata and controls

21 lines (16 loc) · 499 Bytes

Photos

There is builtin support for photos where metadata is stored in the database and photos are stored in the database.

To utilize the builtin photo support, add a new entity like below:

import { BasePhoto } from "src/core/photos";

@Entity()
export class ChatConversationPhoto extends BasePhoto {
  @OneToOne(() => ChatConversation, (conversation) => conversation.photo, {
    onDelete: "CASCADE",
  })
  conversation!: ChatConversation;

  @Column()
  conversationId!: string;
}