2024-12-30 08:26:40 +08:00
|
|
|
import { Prisma } from "@prisma/client";
|
|
|
|
|
|
|
|
export const postDetailSelect: Prisma.PostSelect = {
|
|
|
|
id: true,
|
|
|
|
type: true,
|
|
|
|
title: true,
|
|
|
|
content: true,
|
|
|
|
attachments: true,
|
|
|
|
referenceId: true,
|
2024-12-30 13:44:30 +08:00
|
|
|
watchableDepts: true,
|
|
|
|
watchableStaffs: true,
|
2024-12-30 08:26:40 +08:00
|
|
|
updatedAt: true,
|
|
|
|
author: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
showname: true,
|
|
|
|
avatar: true,
|
|
|
|
department: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
name: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
domain: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
name: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
export const postUnDetailSelect: Prisma.PostSelect = {
|
|
|
|
id: true,
|
|
|
|
type: true,
|
|
|
|
title: true,
|
|
|
|
content: true,
|
|
|
|
attachments: true,
|
|
|
|
updatedAt: true,
|
|
|
|
referenceId: true,
|
|
|
|
author: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
showname: true,
|
|
|
|
avatar: true,
|
|
|
|
department: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
name: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
domain: {
|
|
|
|
select: {
|
|
|
|
id: true,
|
|
|
|
name: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
export const messageDetailSelect: Prisma.MessageSelect = {
|
|
|
|
id: true,
|
|
|
|
sender: true,
|
|
|
|
content: true,
|
|
|
|
title: true,
|
|
|
|
url: true,
|
|
|
|
option: true,
|
|
|
|
intent: true,
|
|
|
|
};
|