36 lines
776 B
TypeScript
36 lines
776 B
TypeScript
![]() |
import { Post, Department, Staff } from "@prisma/client";
|
||
|
import { StaffDto } from "./staff";
|
||
|
|
||
|
export type PostComment = {
|
||
|
id: string;
|
||
|
type: string;
|
||
|
title: string;
|
||
|
content: string;
|
||
|
authorId: string;
|
||
|
domainId: string;
|
||
|
referenceId: string;
|
||
|
resources: string[];
|
||
|
createdAt: Date;
|
||
|
updatedAt: Date;
|
||
|
parentId: string;
|
||
|
author: {
|
||
|
id: string;
|
||
|
showname: string;
|
||
|
username: string;
|
||
|
avatar: string;
|
||
|
};
|
||
|
};
|
||
|
export type PostDto = Post & {
|
||
|
readed: boolean;
|
||
|
readedCount: number;
|
||
|
author: StaffDto;
|
||
|
limitedComments: PostComment[];
|
||
|
commentsCount: number;
|
||
|
perms?: {
|
||
|
delete: boolean;
|
||
|
// edit: boolean;
|
||
|
};
|
||
|
watchableDepts: Department[];
|
||
|
watchableStaffs: Staff[];
|
||
|
};
|