echadospalante-core
Version:
This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.
40 lines (35 loc) • 971 B
text/typescript
import { ContentType } from "../common";
import { Venture } from "../ventures/venture";
import { PublicationCategory } from "./category";
import { PublicationClap } from "./clap";
import { PublicationComment } from "./comment";
export interface VenturePublication {
id: string;
description: string;
active: boolean;
venture?: Venture;
clapsCount: number;
commentsCount: number;
claps: PublicationClap[];
comments: PublicationComment[];
contents: PublicationContent[];
categories: PublicationCategory[];
createdAt: Date;
}
export enum PublicationType {
STANDARD = "STANDARD",
ANNOUNCEMENT = "ANNOUNCEMENT",
ACHIEVEMENT = "ACHIEVEMENT",
PROMOTION = "PROMOTION",
BEHIND_THE_SCENES = "BEHIND_THE_SCENES",
}
export interface PublicationContent {
id: string;
type: ContentType;
content: string; // JSON string
}
export interface PublicationCreate {
description: string;
contents: PublicationContent[];
categoriesIds: string[];
}