UNPKG

@replyke/express

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

31 lines (30 loc) 1.06 kB
import { Model, Sequelize, CreationOptional } from "sequelize"; import { ICommentAttributes, ICommentCreationAttributes } from "../interfaces/IComment"; import IMention from "../interfaces/IMention"; import IGif from "../interfaces/IGif"; export default class Comment extends Model<ICommentAttributes, ICommentCreationAttributes> implements ICommentAttributes { id: string; projectId: string; entityId: string; parentId: string; userId: string; referenceId: string | null; foreignId: string | null; content: string | null; gif: IGif | null; mentions: IMention[]; upvotes: string[]; downvotes: string[]; parentDeletedAt: Date | null; referencedCommentId: string | null; attachments: Record<string, any>[]; metadata: Record<string, any>; createdAt: CreationOptional<Date>; updatedAt: CreationOptional<Date>; deletedAt: CreationOptional<Date>; static initModel(sequelize: Sequelize): void; /** * Define associations to other models */ static associate(): void; }