SquidSpirit 898ee86f91
Some checks failed
Frontend CI / build (push) Failing after 53s
PR Title Check / pr-title-check (pull_request) Successful in 16s
feat: add semanticId to PostInfo, PostInfoViewModel, and PostInfoResponseDto; update PostPreview link
2025-10-12 18:10:01 +08:00

30 lines
741 B
TypeScript

import type { Label } from '$lib/post/domain/entity/label';
export class PostInfo {
readonly id: number;
readonly semanticId: string;
readonly title: string;
readonly description: string;
readonly previewImageUrl: URL;
readonly labels: readonly Label[];
readonly publishedTime: Date | null;
constructor(props: {
id: number;
semanticId: string;
title: string;
description: string;
previewImageUrl: URL;
labels: readonly Label[];
publishedTime: Date | null;
}) {
this.id = props.id;
this.semanticId = props.semanticId;
this.title = props.title;
this.description = props.description;
this.previewImageUrl = props.previewImageUrl;
this.labels = props.labels;
this.publishedTime = props.publishedTime;
}
}