feat: add views and viewSorts tables (#1131)
* feat: add views table Closes #1120 * feat: add viewSorts table Closes #1120
This commit is contained in:
@ -45,7 +45,7 @@ export class ViewFieldResolver {
|
||||
): Promise<Partial<ViewField>> {
|
||||
return this.viewFieldService.create({
|
||||
data: {
|
||||
...args.data,
|
||||
...(args.data as Prisma.ViewFieldCreateInput),
|
||||
workspace: { connect: { id: workspace.id } },
|
||||
},
|
||||
select: prismaSelect.value,
|
||||
|
||||
@ -111,7 +111,9 @@ export class WorkspaceService {
|
||||
comment,
|
||||
activityTarget,
|
||||
activity,
|
||||
view,
|
||||
viewField,
|
||||
viewSort,
|
||||
} = this.prismaService.client;
|
||||
|
||||
const activitys = await activity.findMany({
|
||||
@ -151,9 +153,15 @@ export class WorkspaceService {
|
||||
activity.deleteMany({
|
||||
where,
|
||||
}),
|
||||
view.deleteMany({
|
||||
where,
|
||||
}),
|
||||
viewField.deleteMany({
|
||||
where,
|
||||
}),
|
||||
viewSort.deleteMany({
|
||||
where,
|
||||
}),
|
||||
refreshToken.deleteMany({
|
||||
where: { userId },
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user