2
0

🗃️ Add updatedAt fields where missing

This commit is contained in:
Baptiste Arnaud
2023-02-03 07:58:14 +01:00
parent bf607289f4
commit 0b34321bf7
10 changed files with 80 additions and 29 deletions

View File

@ -10,7 +10,7 @@ import {
} from 'db'
export const workspaceMemberSchema = schemaForType<
Omit<MemberInWorkspacePrisma, 'userId'> & {
Omit<MemberInWorkspacePrisma, 'userId' | 'createdAt' | 'updatedAt'> & {
user: Pick<UserPrisma, 'name' | 'email' | 'image'>
}
>()(
@ -29,17 +29,19 @@ export const workspaceInvitationSchema = schemaForType<
Omit<WorkspaceInvitationPrisma, 'workspaceId' | 'userId' | 'id'>
>()(
z.object({
createdAt: z.date(),
updatedAt: z.date(),
email: z.string(),
type: z.nativeEnum(WorkspaceRole),
createdAt: z.date(),
})
)
export const workspaceSchema = schemaForType<WorkspacePrisma>()(
z.object({
id: z.string(),
name: z.string(),
createdAt: z.date(),
updatedAt: z.date(),
name: z.string(),
icon: z.string().nullable(),
plan: z.nativeEnum(Plan),
stripeId: z.string().nullable(),