@replyke/express
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
36 lines (35 loc) • 1.15 kB
TypeScript
import { Model, Sequelize, CreationOptional } from "sequelize";
import { IEntityAttributes, IEntityCreationAttributes } from "../interfaces/IEntity";
import IMention from "../interfaces/IMention";
export default class Entity extends Model<IEntityAttributes, IEntityCreationAttributes> implements IEntityAttributes {
id: string;
projectId: string;
userId: string;
shortId: string;
referenceId: string | null;
foreignId: string | null;
sourceId: string | null;
resourceId: string | null;
title: string | null;
content: string | null;
media: Record<string, any>[];
attachments: Record<string, any>[];
mentions: IMention[];
upvotes: string[];
downvotes: string[];
sharesCount: number;
views: number;
location: any;
keywords: string[];
score: number;
scoreUpdatedAt: Date;
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;
}