fix: auth otp flow + remove generated
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -55,6 +55,7 @@ pids
|
|||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
/generated/prisma
|
prisma/generated
|
||||||
|
|
||||||
dump.rdb
|
dump.rdb
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,141 @@
|
|||||||
|
export const authOTP = (otp: number) => (
|
||||||
|
`
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Your Verification Code</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
background:#f4f7fb;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
color:#374151;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container{
|
||||||
|
max-width:600px;
|
||||||
|
margin:40px auto;
|
||||||
|
background:#ffffff;
|
||||||
|
border-radius:10px;
|
||||||
|
padding:40px;
|
||||||
|
box-shadow:0 8px 25px rgba(0,0,0,0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo{
|
||||||
|
text-align:center;
|
||||||
|
font-size:24px;
|
||||||
|
font-weight:700;
|
||||||
|
color:#2563eb;
|
||||||
|
margin-bottom:30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
font-size:22px;
|
||||||
|
margin-bottom:10px;
|
||||||
|
color:#111827;
|
||||||
|
}
|
||||||
|
|
||||||
|
p{
|
||||||
|
font-size:15px;
|
||||||
|
color:#4b5563;
|
||||||
|
line-height:1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp-box{
|
||||||
|
margin:35px 0;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp{
|
||||||
|
display:inline-block;
|
||||||
|
font-size:32px;
|
||||||
|
letter-spacing:8px;
|
||||||
|
font-weight:700;
|
||||||
|
background:#f1f5ff;
|
||||||
|
color:#1d4ed8;
|
||||||
|
padding:18px 30px;
|
||||||
|
border-radius:8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expiry{
|
||||||
|
margin-top:12px;
|
||||||
|
font-size:13px;
|
||||||
|
color:#6b7280;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning{
|
||||||
|
margin-top:20px;
|
||||||
|
font-size:13px;
|
||||||
|
color:#6b7280;
|
||||||
|
background:#f9fafb;
|
||||||
|
padding:12px;
|
||||||
|
border-radius:6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer{
|
||||||
|
text-align:center;
|
||||||
|
font-size:12px;
|
||||||
|
color:#9ca3af;
|
||||||
|
margin-top:35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider{
|
||||||
|
height:1px;
|
||||||
|
background:#e5e7eb;
|
||||||
|
margin:30px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<div class="logo">MultiTenant SaaS</div>
|
||||||
|
|
||||||
|
<h1>Your Verification Code</h1>
|
||||||
|
|
||||||
|
<p>Hello,</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Use the following One-Time Password (OTP) to continue signing in to your
|
||||||
|
<strong>MultiTenant SaaS</strong> account.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="otp-box">
|
||||||
|
<div class="otp">${otp}</div>
|
||||||
|
<div class="expiry">This code is valid for <strong>5 minutes</strong> only.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Enter this code in the verification screen to complete your login or signup.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="warning">
|
||||||
|
For security reasons, never share this code with anyone. Our team will never ask you for your OTP.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you did not request this code, you can safely ignore this email.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
© 2026 MultiTenant SaaS. All rights reserved.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`
|
||||||
|
)
|
||||||
|
|
||||||
export const welcomeToApp =
|
export const welcomeToApp =
|
||||||
`
|
`
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { welcomeToApp } from "./auth"
|
import { welcomeToApp, authOTP } from "./auth"
|
||||||
|
|
||||||
const EmailTemplates = {
|
const EmailTemplates = {
|
||||||
|
signup_otp: (otp: number) => ({
|
||||||
|
subject: "Your MultiTenant SaaS Verification Code",
|
||||||
|
body: authOTP(otp)
|
||||||
|
}),
|
||||||
signup_completed: {
|
signup_completed: {
|
||||||
subject: "Welcome to app",
|
subject: "Welcome to app",
|
||||||
body: welcomeToApp
|
body: welcomeToApp
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file should be your main import to use Prisma-related types and utilities in a browser.
|
|
||||||
* Use it to get access to models, enums, and input types.
|
|
||||||
*
|
|
||||||
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
|
|
||||||
* See `client.ts` for the standard, server-side entry point.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as Prisma from './internal/prismaNamespaceBrowser'
|
|
||||||
export { Prisma }
|
|
||||||
export * as $Enums from './enums'
|
|
||||||
export * from './enums';
|
|
||||||
/**
|
|
||||||
* Model OrganizationJoinRequest
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrganizationJoinRequest = Prisma.OrganizationJoinRequestModel
|
|
||||||
/**
|
|
||||||
* Model OrganizationUserJoinTable
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrganizationUserJoinTable = Prisma.OrganizationUserJoinTableModel
|
|
||||||
/**
|
|
||||||
* Model Organization
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Organization = Prisma.OrganizationModel
|
|
||||||
/**
|
|
||||||
* Model User
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type User = Prisma.UserModel
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
||||||
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as process from 'node:process'
|
|
||||||
import * as path from 'node:path'
|
|
||||||
|
|
||||||
import * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import * as $Enums from "./enums"
|
|
||||||
import * as $Class from "./internal/class"
|
|
||||||
import * as Prisma from "./internal/prismaNamespace"
|
|
||||||
|
|
||||||
export * as $Enums from './enums'
|
|
||||||
export * from "./enums"
|
|
||||||
/**
|
|
||||||
* ## Prisma Client
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new PrismaClient()
|
|
||||||
* // Fetch zero or more OrganizationJoinRequests
|
|
||||||
* const organizationJoinRequests = await prisma.organizationJoinRequest.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
|
||||||
*/
|
|
||||||
export const PrismaClient = $Class.getPrismaClientClass()
|
|
||||||
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
||||||
export { Prisma }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model OrganizationJoinRequest
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrganizationJoinRequest = Prisma.OrganizationJoinRequestModel
|
|
||||||
/**
|
|
||||||
* Model OrganizationUserJoinTable
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrganizationUserJoinTable = Prisma.OrganizationUserJoinTableModel
|
|
||||||
/**
|
|
||||||
* Model Organization
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Organization = Prisma.OrganizationModel
|
|
||||||
/**
|
|
||||||
* Model User
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type User = Prisma.UserModel
|
|
||||||
@@ -1,434 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports various common sort, input & filter types that are not directly linked to a particular model.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import type * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import * as $Enums from "./enums"
|
|
||||||
import type * as Prisma from "./internal/prismaNamespace"
|
|
||||||
|
|
||||||
|
|
||||||
export type StringFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
mode?: Prisma.QueryMode
|
|
||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST | Prisma.EnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE | Prisma.EnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST_TYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORG_ROLEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORG_ROLE | Prisma.EnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel> | $Enums.ORG_ROLE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StringNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
mode?: Prisma.QueryMode
|
|
||||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SortOrderInput = {
|
|
||||||
sort: Prisma.SortOrder
|
|
||||||
nulls?: Prisma.NullsOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
mode?: Prisma.QueryMode
|
|
||||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORGANIZATION_JOIN_REQUESTWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST | Prisma.EnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTWithAggregatesFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORGANIZATION_JOIN_REQUEST_TYPEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE | Prisma.EnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEWithAggregatesFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST_TYPE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumORG_ROLEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORG_ROLE | Prisma.EnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORG_ROLEWithAggregatesFilter<$PrismaModel> | $Enums.ORG_ROLE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
mode?: Prisma.QueryMode
|
|
||||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumUSER_ROLEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.USER_ROLE | Prisma.EnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel> | $Enums.USER_ROLE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumUSER_ROLEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.USER_ROLE | Prisma.EnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumUSER_ROLEWithAggregatesFilter<$PrismaModel> | $Enums.USER_ROLE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST | Prisma.EnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE | Prisma.EnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST_TYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORG_ROLEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORG_ROLE | Prisma.EnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel> | $Enums.ORG_ROLE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORGANIZATION_JOIN_REQUESTWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST | Prisma.EnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST[] | Prisma.ListEnumORGANIZATION_JOIN_REQUESTFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTWithAggregatesFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORGANIZATION_JOIN_REQUESTFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORGANIZATION_JOIN_REQUEST_TYPEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE | Prisma.EnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORGANIZATION_JOIN_REQUEST_TYPE[] | Prisma.ListEnumORGANIZATION_JOIN_REQUEST_TYPEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEWithAggregatesFilter<$PrismaModel> | $Enums.ORGANIZATION_JOIN_REQUEST_TYPE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORGANIZATION_JOIN_REQUEST_TYPEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumORG_ROLEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.ORG_ROLE | Prisma.EnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.ORG_ROLE[] | Prisma.ListEnumORG_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumORG_ROLEWithAggregatesFilter<$PrismaModel> | $Enums.ORG_ROLE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumORG_ROLEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumUSER_ROLEFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.USER_ROLE | Prisma.EnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel> | $Enums.USER_ROLE
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumUSER_ROLEWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.USER_ROLE | Prisma.EnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: $Enums.USER_ROLE[] | Prisma.ListEnumUSER_ROLEFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedEnumUSER_ROLEWithAggregatesFilter<$PrismaModel> | $Enums.USER_ROLE
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumUSER_ROLEFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports all enum related types from the schema.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const ORGANIZATION_JOIN_REQUEST = {
|
|
||||||
PENDING: 'PENDING',
|
|
||||||
ACCEPTED: 'ACCEPTED',
|
|
||||||
REJECTED: 'REJECTED',
|
|
||||||
CANCELLED: 'CANCELLED'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ORGANIZATION_JOIN_REQUEST = (typeof ORGANIZATION_JOIN_REQUEST)[keyof typeof ORGANIZATION_JOIN_REQUEST]
|
|
||||||
|
|
||||||
|
|
||||||
export const ORGANIZATION_JOIN_REQUEST_TYPE = {
|
|
||||||
INVITED: 'INVITED',
|
|
||||||
REQUESTED: 'REQUESTED'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ORGANIZATION_JOIN_REQUEST_TYPE = (typeof ORGANIZATION_JOIN_REQUEST_TYPE)[keyof typeof ORGANIZATION_JOIN_REQUEST_TYPE]
|
|
||||||
|
|
||||||
|
|
||||||
export const ORG_ROLE = {
|
|
||||||
owner: 'owner',
|
|
||||||
admin: 'admin',
|
|
||||||
member: 'member'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ORG_ROLE = (typeof ORG_ROLE)[keyof typeof ORG_ROLE]
|
|
||||||
|
|
||||||
|
|
||||||
export const USER_ROLE = {
|
|
||||||
superadmin: 'superadmin',
|
|
||||||
user: 'user'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type USER_ROLE = (typeof USER_ROLE)[keyof typeof USER_ROLE]
|
|
||||||
@@ -1,222 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* WARNING: This is an internal file that is subject to change!
|
|
||||||
*
|
|
||||||
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
||||||
*
|
|
||||||
* Please import the `PrismaClient` class from the `client.ts` file instead.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import type * as Prisma from "./prismaNamespace"
|
|
||||||
|
|
||||||
|
|
||||||
const config: runtime.GetPrismaClientConfig = {
|
|
||||||
"previewFeatures": [],
|
|
||||||
"clientVersion": "7.3.0",
|
|
||||||
"engineVersion": "9d6ad21cbbceab97458517b147a6a09ff43aa735",
|
|
||||||
"activeProvider": "postgresql",
|
|
||||||
"inlineSchema": "model OrganizationJoinRequest {\n id String @id @default(uuid())\n userId String\n orgId String\n status ORGANIZATION_JOIN_REQUEST @default(PENDING)\n requestType ORGANIZATION_JOIN_REQUEST_TYPE\n requestedOn DateTime @default(now())\n role ORG_ROLE @default(member)\n updatedAt DateTime @updatedAt\n rejectReason String?\n requestMessage String?\n\n organization Organization @relation(fields: [orgId], references: [id], onDelete: Cascade)\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n // @@unique([userId, orgId])\n @@index([userId, orgId])\n @@map(\"organization_join_request\")\n}\n\nenum ORGANIZATION_JOIN_REQUEST {\n PENDING\n ACCEPTED\n REJECTED\n CANCELLED\n}\n\nenum ORGANIZATION_JOIN_REQUEST_TYPE {\n INVITED\n REQUESTED\n}\n\nmodel OrganizationUserJoinTable {\n userId String\n orgId String\n role ORG_ROLE @default(member)\n joinedDate DateTime @default(now())\n\n organization Organization @relation(fields: [orgId], references: [id], onDelete: Restrict)\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@unique([userId, orgId])\n @@map(\"organization_user_join\")\n}\n\nenum ORG_ROLE {\n owner\n admin\n member\n}\n\nmodel Organization {\n id String @id @default(uuid())\n name String\n description String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n members OrganizationUserJoinTable[]\n requestingMembers OrganizationJoinRequest[]\n\n @@map(\"organization\")\n}\n\n// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel User {\n id String @id @default(uuid())\n firstName String\n middleName String?\n lastName String\n email String @unique\n password String\n role USER_ROLE @default(user)\n isVerified Boolean? @default(false) // TODO: Email using queue\n refreshToken String?\n profilePicture String?\n isDeleted Boolean? @default(false)\n deletedAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n organizations OrganizationUserJoinTable[]\n organizationsRequested OrganizationJoinRequest[]\n\n @@map(\"user\")\n}\n\nenum USER_ROLE {\n superadmin\n user\n}\n",
|
|
||||||
"runtimeDataModel": {
|
|
||||||
"models": {},
|
|
||||||
"enums": {},
|
|
||||||
"types": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
config.runtimeDataModel = JSON.parse("{\"models\":{\"OrganizationJoinRequest\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"orgId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"ORGANIZATION_JOIN_REQUEST\"},{\"name\":\"requestType\",\"kind\":\"enum\",\"type\":\"ORGANIZATION_JOIN_REQUEST_TYPE\"},{\"name\":\"requestedOn\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"ORG_ROLE\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"rejectReason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"requestMessage\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"organization\",\"kind\":\"object\",\"type\":\"Organization\",\"relationName\":\"OrganizationToOrganizationJoinRequest\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"OrganizationJoinRequestToUser\"}],\"dbName\":\"organization_join_request\"},\"OrganizationUserJoinTable\":{\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"orgId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"ORG_ROLE\"},{\"name\":\"joinedDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"organization\",\"kind\":\"object\",\"type\":\"Organization\",\"relationName\":\"OrganizationToOrganizationUserJoinTable\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"OrganizationUserJoinTableToUser\"}],\"dbName\":\"organization_user_join\"},\"Organization\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"members\",\"kind\":\"object\",\"type\":\"OrganizationUserJoinTable\",\"relationName\":\"OrganizationToOrganizationUserJoinTable\"},{\"name\":\"requestingMembers\",\"kind\":\"object\",\"type\":\"OrganizationJoinRequest\",\"relationName\":\"OrganizationToOrganizationJoinRequest\"}],\"dbName\":\"organization\"},\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"middleName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"USER_ROLE\"},{\"name\":\"isVerified\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"refreshToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"profilePicture\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isDeleted\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"organizations\",\"kind\":\"object\",\"type\":\"OrganizationUserJoinTable\",\"relationName\":\"OrganizationUserJoinTableToUser\"},{\"name\":\"organizationsRequested\",\"kind\":\"object\",\"type\":\"OrganizationJoinRequest\",\"relationName\":\"OrganizationJoinRequestToUser\"}],\"dbName\":\"user\"}},\"enums\":{},\"types\":{}}")
|
|
||||||
|
|
||||||
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
||||||
const { Buffer } = await import('node:buffer')
|
|
||||||
const wasmArray = Buffer.from(wasmBase64, 'base64')
|
|
||||||
return new WebAssembly.Module(wasmArray)
|
|
||||||
}
|
|
||||||
|
|
||||||
config.compilerWasm = {
|
|
||||||
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.js"),
|
|
||||||
|
|
||||||
getQueryCompilerWasmModule: async () => {
|
|
||||||
const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.js")
|
|
||||||
return await decodeBase64AsWasm(wasm)
|
|
||||||
},
|
|
||||||
|
|
||||||
importName: "./query_compiler_fast_bg.js"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
||||||
'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
|
|
||||||
|
|
||||||
export interface PrismaClientConstructor {
|
|
||||||
/**
|
|
||||||
* ## Prisma Client
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new PrismaClient()
|
|
||||||
* // Fetch zero or more OrganizationJoinRequests
|
|
||||||
* const organizationJoinRequests = await prisma.organizationJoinRequest.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
|
||||||
*/
|
|
||||||
|
|
||||||
new <
|
|
||||||
Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
|
|
||||||
LogOpts extends LogOptions<Options> = LogOptions<Options>,
|
|
||||||
OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
|
|
||||||
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
||||||
>(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ## Prisma Client
|
|
||||||
*
|
|
||||||
* Type-safe database client for TypeScript
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const prisma = new PrismaClient()
|
|
||||||
* // Fetch zero or more OrganizationJoinRequests
|
|
||||||
* const organizationJoinRequests = await prisma.organizationJoinRequest.findMany()
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface PrismaClient<
|
|
||||||
in LogOpts extends Prisma.LogLevel = never,
|
|
||||||
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
|
|
||||||
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
||||||
> {
|
|
||||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
||||||
|
|
||||||
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connect with the database
|
|
||||||
*/
|
|
||||||
$connect(): runtime.Types.Utils.JsPromise<void>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disconnect from the database
|
|
||||||
*/
|
|
||||||
$disconnect(): runtime.Types.Utils.JsPromise<void>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes a prepared raw query and returns the number of affected rows.
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
||||||
*/
|
|
||||||
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Executes a raw query and returns the number of affected rows.
|
|
||||||
* Susceptible to SQL injections, see documentation.
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
||||||
*/
|
|
||||||
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Performs a prepared raw query and returns the `SELECT` data.
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
||||||
*/
|
|
||||||
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Performs a raw query and returns the `SELECT` data.
|
|
||||||
* Susceptible to SQL injections, see documentation.
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
||||||
*/
|
|
||||||
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
||||||
* @example
|
|
||||||
* ```
|
|
||||||
* const [george, bob, alice] = await prisma.$transaction([
|
|
||||||
* prisma.user.create({ data: { name: 'George' } }),
|
|
||||||
* prisma.user.create({ data: { name: 'Bob' } }),
|
|
||||||
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
||||||
* ])
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
||||||
*/
|
|
||||||
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
||||||
|
|
||||||
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
|
|
||||||
|
|
||||||
$extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
|
|
||||||
extArgs: ExtArgs
|
|
||||||
}>>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `prisma.organizationJoinRequest`: Exposes CRUD operations for the **OrganizationJoinRequest** model.
|
|
||||||
* Example usage:
|
|
||||||
* ```ts
|
|
||||||
* // Fetch zero or more OrganizationJoinRequests
|
|
||||||
* const organizationJoinRequests = await prisma.organizationJoinRequest.findMany()
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
get organizationJoinRequest(): Prisma.OrganizationJoinRequestDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `prisma.organizationUserJoinTable`: Exposes CRUD operations for the **OrganizationUserJoinTable** model.
|
|
||||||
* Example usage:
|
|
||||||
* ```ts
|
|
||||||
* // Fetch zero or more OrganizationUserJoinTables
|
|
||||||
* const organizationUserJoinTables = await prisma.organizationUserJoinTable.findMany()
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
get organizationUserJoinTable(): Prisma.OrganizationUserJoinTableDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `prisma.organization`: Exposes CRUD operations for the **Organization** model.
|
|
||||||
* Example usage:
|
|
||||||
* ```ts
|
|
||||||
* // Fetch zero or more Organizations
|
|
||||||
* const organizations = await prisma.organization.findMany()
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
get organization(): Prisma.OrganizationDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `prisma.user`: Exposes CRUD operations for the **User** model.
|
|
||||||
* Example usage:
|
|
||||||
* ```ts
|
|
||||||
* // Fetch zero or more Users
|
|
||||||
* const users = await prisma.user.findMany()
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getPrismaClientClass(): PrismaClientConstructor {
|
|
||||||
return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,155 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* WARNING: This is an internal file that is subject to change!
|
|
||||||
*
|
|
||||||
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
||||||
*
|
|
||||||
* All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file.
|
|
||||||
* While this enables partial backward compatibility, it is not part of the stable public API.
|
|
||||||
*
|
|
||||||
* If you are looking for your Models, Enums, and Input Types, please import them from the respective
|
|
||||||
* model files in the `model` directory!
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as runtime from "@prisma/client/runtime/index-browser"
|
|
||||||
|
|
||||||
export type * from '../models'
|
|
||||||
export type * from './prismaNamespace'
|
|
||||||
|
|
||||||
export const Decimal = runtime.Decimal
|
|
||||||
|
|
||||||
|
|
||||||
export const NullTypes = {
|
|
||||||
DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
|
|
||||||
JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
|
|
||||||
AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
|
||||||
*
|
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
||||||
*/
|
|
||||||
export const DbNull = runtime.DbNull
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
|
||||||
*
|
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
||||||
*/
|
|
||||||
export const JsonNull = runtime.JsonNull
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
|
||||||
*
|
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
||||||
*/
|
|
||||||
export const AnyNull = runtime.AnyNull
|
|
||||||
|
|
||||||
|
|
||||||
export const ModelName = {
|
|
||||||
OrganizationJoinRequest: 'OrganizationJoinRequest',
|
|
||||||
OrganizationUserJoinTable: 'OrganizationUserJoinTable',
|
|
||||||
Organization: 'Organization',
|
|
||||||
User: 'User'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Enums
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const TransactionIsolationLevel = runtime.makeStrictEnum({
|
|
||||||
ReadUncommitted: 'ReadUncommitted',
|
|
||||||
ReadCommitted: 'ReadCommitted',
|
|
||||||
RepeatableRead: 'RepeatableRead',
|
|
||||||
Serializable: 'Serializable'
|
|
||||||
} as const)
|
|
||||||
|
|
||||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrganizationJoinRequestScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
userId: 'userId',
|
|
||||||
orgId: 'orgId',
|
|
||||||
status: 'status',
|
|
||||||
requestType: 'requestType',
|
|
||||||
requestedOn: 'requestedOn',
|
|
||||||
role: 'role',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
rejectReason: 'rejectReason',
|
|
||||||
requestMessage: 'requestMessage'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrganizationJoinRequestScalarFieldEnum = (typeof OrganizationJoinRequestScalarFieldEnum)[keyof typeof OrganizationJoinRequestScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrganizationUserJoinTableScalarFieldEnum = {
|
|
||||||
userId: 'userId',
|
|
||||||
orgId: 'orgId',
|
|
||||||
role: 'role',
|
|
||||||
joinedDate: 'joinedDate'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrganizationUserJoinTableScalarFieldEnum = (typeof OrganizationUserJoinTableScalarFieldEnum)[keyof typeof OrganizationUserJoinTableScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrganizationScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrganizationScalarFieldEnum = (typeof OrganizationScalarFieldEnum)[keyof typeof OrganizationScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const UserScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
firstName: 'firstName',
|
|
||||||
middleName: 'middleName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
password: 'password',
|
|
||||||
role: 'role',
|
|
||||||
isVerified: 'isVerified',
|
|
||||||
refreshToken: 'refreshToken',
|
|
||||||
profilePicture: 'profilePicture',
|
|
||||||
isDeleted: 'isDeleted',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SortOrder = {
|
|
||||||
asc: 'asc',
|
|
||||||
desc: 'desc'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
||||||
|
|
||||||
|
|
||||||
export const QueryMode = {
|
|
||||||
default: 'default',
|
|
||||||
insensitive: 'insensitive'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|
||||||
|
|
||||||
|
|
||||||
export const NullsOrder = {
|
|
||||||
first: 'first',
|
|
||||||
last: 'last'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This is a barrel export file for all models and their related types.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
export type * from './models/OrganizationJoinRequest'
|
|
||||||
export type * from './models/OrganizationUserJoinTable'
|
|
||||||
export type * from './models/Organization'
|
|
||||||
export type * from './models/User'
|
|
||||||
export type * from './commonInputTypes'
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
|||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "user_otp" (
|
||||||
|
"email" TEXT NOT NULL,
|
||||||
|
"otp" INTEGER NOT NULL,
|
||||||
|
"generatedOn" TIMESTAMP(3) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "user_otp_email_key" ON "user_otp"("email");
|
||||||
@@ -21,6 +21,14 @@ model User {
|
|||||||
@@map("user")
|
@@map("user")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model UserOTP {
|
||||||
|
email String @unique
|
||||||
|
otp Int
|
||||||
|
generatedOn DateTime
|
||||||
|
|
||||||
|
@@map("user_otp")
|
||||||
|
}
|
||||||
|
|
||||||
enum USER_ROLE {
|
enum USER_ROLE {
|
||||||
superadmin
|
superadmin
|
||||||
user
|
user
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export class AuthController {
|
|||||||
async register(@Body() body: RegisterUserRequestDTO): Promise<string> {
|
async register(@Body() body: RegisterUserRequestDTO): Promise<string> {
|
||||||
await this.authService.register(body);
|
await this.authService.register(body);
|
||||||
|
|
||||||
return 'Registered successfully. Login to continue.';
|
return 'Check your email for OTP';
|
||||||
}
|
}
|
||||||
|
|
||||||
logout() { }
|
logout() { }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
import { ConflictException, Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
||||||
import { Public } from './decorators';
|
import { Public } from './decorators';
|
||||||
import { LoginUserRequestDTO, RegisterUserRequestDTO } from './dto';
|
import { LoginUserRequestDTO, RegisterUserRequestDTO } from './dto';
|
||||||
import * as bcrypt from 'bcrypt';
|
import * as bcrypt from 'bcrypt';
|
||||||
@@ -17,26 +17,75 @@ export class AuthService {
|
|||||||
@InjectQueue('mail') private readonly mailQueue: Queue
|
@InjectQueue('mail') private readonly mailQueue: Queue
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
// Generate OTP
|
||||||
async register(dto: RegisterUserRequestDTO) {
|
async register(dto: RegisterUserRequestDTO) {
|
||||||
const hashedPassword = await bcrypt.hash(dto.password, 10);
|
const [userExists, otpExists] = await Promise.all([
|
||||||
await this.userService.createUserWithPassword({
|
this.userService.findByEmail(dto.email),
|
||||||
...dto,
|
this.userService.findByEmailInOTP(dto.email),
|
||||||
password: hashedPassword,
|
])
|
||||||
});
|
|
||||||
|
|
||||||
this.mailQueue.add('send-welcome-email', {
|
if (userExists)
|
||||||
email: dto.email
|
throw new ConflictException("User with this email already exists");
|
||||||
|
else if (otpExists) {
|
||||||
|
/* *
|
||||||
|
* If OTP was last generated more than 2 minutes ago, regen.
|
||||||
|
* Else, do nothing
|
||||||
|
* */
|
||||||
|
const now = Number(new Date()) / 1000;
|
||||||
|
const generatedOn = Number(otpExists.generatedOn) / 1000;
|
||||||
|
|
||||||
|
if (generatedOn + (60 * 2) > now) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const otp = this.genOtp()
|
||||||
|
|
||||||
|
await this.userService.updateOTPByEmail(dto.email, otp);
|
||||||
|
|
||||||
|
this.mailQueue.add('send-register-otp-email', {
|
||||||
|
email: dto.email,
|
||||||
|
otp: otp
|
||||||
}, {
|
}, {
|
||||||
attempts: 3,
|
attempts: 3,
|
||||||
backoff: {
|
backoff: {
|
||||||
type: "exponential",
|
type: "exponential",
|
||||||
delay: 3000,
|
delay: 3000
|
||||||
},
|
},
|
||||||
removeOnComplete: true, // clean up Redis after success
|
removeOnComplete: true, // clean up Redis after success
|
||||||
removeOnFail: false,
|
removeOnFail: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
// const hashedPassword = await bcrypt.hash(dto.password, 10);
|
||||||
|
// await this.userService.createUserWithPassword({
|
||||||
|
// ...dto,
|
||||||
|
// password: hashedPassword,
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// this.mailQueue.add('send-welcome-email', {
|
||||||
|
// email: dto.email
|
||||||
|
// }, {
|
||||||
|
// attempts: 3,
|
||||||
|
// backoff: {
|
||||||
|
// type: "exponential",
|
||||||
|
// delay: 3000,
|
||||||
|
// },
|
||||||
|
// removeOnComplete: true, // clean up Redis after success
|
||||||
|
// removeOnFail: false,
|
||||||
|
// })
|
||||||
|
//
|
||||||
|
// return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate OTP
|
||||||
|
async validateOtp() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete rest of singup process
|
||||||
|
async completeSignup() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async login(dto: LoginUserRequestDTO) {
|
async login(dto: LoginUserRequestDTO) {
|
||||||
@@ -86,4 +135,9 @@ export class AuthService {
|
|||||||
|
|
||||||
return { accessToken, refreshToken };
|
return { accessToken, refreshToken };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private genOtp() {
|
||||||
|
return 123456;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/mail/mail-job-names.ts
Normal file
4
src/mail/mail-job-names.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export const MAIL_JOBS_NAME = {
|
||||||
|
WELCOME: 'send-welcome-email',
|
||||||
|
REGISTER_OTP: 'send-register-otp-email'
|
||||||
|
}
|
||||||
44
src/mail/mail.consumer.ts
Normal file
44
src/mail/mail.consumer.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import { Processor, WorkerHost } from "@nestjs/bullmq";
|
||||||
|
import { Job } from "bullmq";
|
||||||
|
import { MailService } from "./mail.service";
|
||||||
|
import { MAIL_JOBS_NAME } from "./mail-job-names";
|
||||||
|
import { RegisterOtpEmailJob, WelcomeEmailJob } from "./mail.interface";
|
||||||
|
|
||||||
|
@Processor('mail')
|
||||||
|
export class MailConsumer extends WorkerHost {
|
||||||
|
constructor(private readonly mailService: MailService) {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
// This runs, so we define handlers here
|
||||||
|
async process(job: Job) {
|
||||||
|
const handlers: Record<string, (job: Job) => Promise<void>> = {
|
||||||
|
[MAIL_JOBS_NAME.REGISTER_OTP]: (j: Job<RegisterOtpEmailJob>) =>
|
||||||
|
this.handleSendOTPMail(j),
|
||||||
|
|
||||||
|
[MAIL_JOBS_NAME.WELCOME]: (j: Job<WelcomeEmailJob>) =>
|
||||||
|
this.handleSendWelcomeMail(j),
|
||||||
|
}
|
||||||
|
|
||||||
|
const handler = handlers[job.name];
|
||||||
|
if (!handler) throw new Error(`No handler for job: ${job.name}`);
|
||||||
|
await handler(job);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These are seperated. Using switch-case is not scalable, couldn't define types
|
||||||
|
* when there were multiple types of emails to be sent
|
||||||
|
* */
|
||||||
|
async handleSendOTPMail(job: Job<RegisterOtpEmailJob>) {
|
||||||
|
await this.mailService.sendOTPMail({
|
||||||
|
to: job.data.email,
|
||||||
|
otp: job.data.otp
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
async handleSendWelcomeMail(job: Job<WelcomeEmailJob>) {
|
||||||
|
await this.mailService.sendWelcomeMail({ to: job.data.email })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
8
src/mail/mail.interface.ts
Normal file
8
src/mail/mail.interface.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
export interface WelcomeEmailJob {
|
||||||
|
email: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RegisterOtpEmailJob {
|
||||||
|
email: string;
|
||||||
|
otp: number;
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { MailService } from './mail.service';
|
import { MailService } from './mail.service';
|
||||||
import { BullModule } from '@nestjs/bullmq';
|
import { BullModule } from '@nestjs/bullmq';
|
||||||
import { MailConsumer } from './mail.processor';
|
import { MailConsumer } from './mail.consumer';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
BullModule.registerQueue({
|
BullModule.registerQueue({
|
||||||
name: "welcome_mail"
|
name: "mail"
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
providers: [MailService, MailConsumer],
|
providers: [MailService, MailConsumer],
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import { Processor, WorkerHost } from "@nestjs/bullmq";
|
|
||||||
import { Job } from "bullmq";
|
|
||||||
import { MailService } from "./mail.service";
|
|
||||||
|
|
||||||
@Processor('mail')
|
|
||||||
export class MailConsumer extends WorkerHost {
|
|
||||||
constructor(private readonly mailService: MailService) {
|
|
||||||
super()
|
|
||||||
}
|
|
||||||
|
|
||||||
async process(job: Job<{ email: string }>) {
|
|
||||||
switch (job.name) {
|
|
||||||
case 'send-welcome-email':
|
|
||||||
await this.mailService.sendWelcomeMail({ to: job.data.email })
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,6 +49,21 @@ export class MailService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async sendOTPMail({ to, otp }: { to: string, otp: number }) {
|
||||||
|
if (!this.mailServiceAvailable)
|
||||||
|
throw new Error("Mail service not available")
|
||||||
|
|
||||||
|
const email = EmailTemplates.signup_otp(otp);
|
||||||
|
|
||||||
|
await this.transporter.sendMail(
|
||||||
|
{
|
||||||
|
to,
|
||||||
|
subject: email.subject,
|
||||||
|
html: email.body
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
sendMail({ to, subject, body }: { to: string, subject: string, body: string }) {
|
sendMail({ to, subject, body }: { to: string, subject: string, body: string }) {
|
||||||
if (!this.mailServiceAvailable)
|
if (!this.mailServiceAvailable)
|
||||||
throw new Error("Mail service not available")
|
throw new Error("Mail service not available")
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import { ConfigService } from '@nestjs/config';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class PrismaService
|
export class PrismaService
|
||||||
extends PrismaClient
|
extends PrismaClient
|
||||||
implements OnModuleDestroy, OnModuleInit
|
implements OnModuleDestroy, OnModuleInit {
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly ctx: RequestContextService,
|
private readonly ctx: RequestContextService,
|
||||||
private readonly configService: ConfigService,
|
private readonly configService: ConfigService,
|
||||||
|
|||||||
@@ -50,4 +50,40 @@ export class UserService {
|
|||||||
data: { refreshToken },
|
data: { refreshToken },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USER OTP SERVICES
|
||||||
|
* */
|
||||||
|
async findByEmailInOTP(email: string) {
|
||||||
|
return await this.prisma.userOTP.findUnique({
|
||||||
|
where: {
|
||||||
|
email,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async removeByEmailInOTP(email: string) {
|
||||||
|
return await this.prisma.userOTP.delete({
|
||||||
|
where: {
|
||||||
|
email
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async updateOTPByEmail(email: string, otp: number) {
|
||||||
|
return await this.prisma.userOTP.upsert({
|
||||||
|
where: {
|
||||||
|
email
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
email,
|
||||||
|
otp,
|
||||||
|
generatedOn: new Date()
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
otp,
|
||||||
|
generatedOn: new Date()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user