refactor: migrate authentication from Supabase to Better Auth and update Prisma schema models

This commit is contained in:
Jose Selesan
2026-04-16 20:05:08 -03:00
parent bd30b32b49
commit f158845279
28 changed files with 1275 additions and 608 deletions

View File

@@ -51,6 +51,10 @@ export const AnyNull = runtime.AnyNull
export const ModelName = {
User: 'User',
Session: 'Session',
Account: 'Account',
Verification: 'Verification',
Complex: 'Complex',
ComplexUser: 'ComplexUser',
Sport: 'Sport',
@@ -60,8 +64,7 @@ export const ModelName = {
CourtBooking: 'CourtBooking',
OnboardingRequest: 'OnboardingRequest',
PasswordResetRequest: 'PasswordResetRequest',
Plan: 'Plan',
User: 'User'
Plan: 'Plan'
} as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -80,6 +83,64 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
export const UserScalarFieldEnum = {
id: 'id',
name: 'name',
email: 'email',
emailVerified: 'emailVerified',
image: 'image',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
export const SessionScalarFieldEnum = {
id: 'id',
expiresAt: 'expiresAt',
token: 'token',
createdAt: 'createdAt',
updatedAt: 'updatedAt',
ipAddress: 'ipAddress',
userAgent: 'userAgent',
userId: 'userId'
} as const
export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
export const AccountScalarFieldEnum = {
id: 'id',
accountId: 'accountId',
providerId: 'providerId',
userId: 'userId',
accessToken: 'accessToken',
refreshToken: 'refreshToken',
idToken: 'idToken',
accessTokenExpiresAt: 'accessTokenExpiresAt',
refreshTokenExpiresAt: 'refreshTokenExpiresAt',
scope: 'scope',
password: 'password',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
export const VerificationScalarFieldEnum = {
id: 'id',
identifier: 'identifier',
value: 'value',
expiresAt: 'expiresAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type VerificationScalarFieldEnum = (typeof VerificationScalarFieldEnum)[keyof typeof VerificationScalarFieldEnum]
export const ComplexScalarFieldEnum = {
id: 'id',
complexName: 'complexName',
@@ -222,18 +283,6 @@ export const PlanScalarFieldEnum = {
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
export const UserScalarFieldEnum = {
id: 'id',
supabaseUserId: 'supabaseUserId',
email: 'email',
fullName: 'fullName',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
export const SortOrder = {
asc: 'asc',
desc: 'desc'