import { Injectable } from "@nestjs/common" ; import { PrismaService } from "../_prisma/prisma.service" ; @ Injectable ( ) export class WorkspaceManagementService { constructor ( private readonly prisma ) { } async listWorkspaces ( p ) { const list = await this . prisma . workspace . findMany ( { where : { } , } ) ; return list ; } async getWorkspace ( p ) { const workspace = await this . prisma . workspace . findUnique ( { where : { id : p . id , } , } ) ; return workspace ; } async getPrimaryWorkspace ( ) { const userid = "" ; const workspace = await this . prisma . workspace . findFirst ( { orderBy : { updatedAt : "asc" , } , where : { id : userid , } , } ) ; return workspace ; } async getPersonalWorkspace ( ) { } async createWorkspace ( p ) { } async archiveWorkspace ( p ) { } async updateWorkspaceInformation ( ) { } }