UNPKG

@replyke/express

Version:

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

35 lines (34 loc) 1.25 kB
import { Model, Optional } from "sequelize"; import IMention from "./IMention"; import ILocation from "./ILocation"; export interface IEntityAttributes { id: string; shortId: string | null; projectId: string; referenceId: string | null; foreignId: string | null; sourceId: string | null; resourceId: string | null; userId: string | null; title: string | null; content: string | null; mentions: IMention[]; media: Record<string, any>[]; attachments: Record<string, any>[]; keywords: string[]; location?: ILocation; upvotes: string[]; downvotes: string[]; sharesCount: number; views: number; score: number; scoreUpdatedAt: Date; metadata: Record<string, any>; createdAt: Date; updatedAt: Date; deletedAt: Date | null; } export interface IEntityCreationAttributes extends Optional<IEntityAttributes, "id" | "shortId" | "sourceId" | "resourceId" | "mentions" | "media" | "attachments" | "keywords" | "location" | "upvotes" | "downvotes" | "sharesCount" | "views" | "score" | "scoreUpdatedAt" | "metadata" | "createdAt" | "updatedAt"> { } export default interface IEntity extends Model<IEntityAttributes, IEntityCreationAttributes>, IEntityAttributes { }