- added settings page and function

- add Role Ring for avatar and display role for user nav
This commit is contained in:
2026-01-06 21:37:53 +07:00
parent 8146565d2c
commit a4e96fe045
64 changed files with 2828 additions and 726 deletions

View File

@@ -52,3 +52,8 @@ export type Member = Prisma.MemberModel
*
*/
export type Invitation = Prisma.InvitationModel
/**
* Model Setting
*
*/
export type Setting = Prisma.SettingModel

View File

@@ -74,3 +74,8 @@ export type Member = Prisma.MemberModel
*
*/
export type Invitation = Prisma.InvitationModel
/**
* Model Setting
*
*/
export type Setting = Prisma.SettingModel

File diff suppressed because one or more lines are too long

View File

@@ -80,12 +80,12 @@ export type PrismaVersion = {
}
/**
* Prisma Client JS version: 7.1.0
* Query Engine version: ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba
* Prisma Client JS version: 7.2.0
* Query Engine version: 0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
*/
export const prismaVersion: PrismaVersion = {
client: "7.1.0",
engine: "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba"
client: "7.2.0",
engine: "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3"
}
/**
@@ -390,7 +390,8 @@ export const ModelName = {
Verification: 'Verification',
Organization: 'Organization',
Member: 'Member',
Invitation: 'Invitation'
Invitation: 'Invitation',
Setting: 'Setting'
} as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -406,7 +407,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
omit: GlobalOmitOptions
}
meta: {
modelProps: "user" | "session" | "account" | "verification" | "organization" | "member" | "invitation"
modelProps: "user" | "session" | "account" | "verification" | "organization" | "member" | "invitation" | "setting"
txIsolationLevel: TransactionIsolationLevel
}
model: {
@@ -928,6 +929,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
}
}
}
Setting: {
payload: Prisma.$SettingPayload<ExtArgs>
fields: Prisma.SettingFieldRefs
operations: {
findUnique: {
args: Prisma.SettingFindUniqueArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload> | null
}
findUniqueOrThrow: {
args: Prisma.SettingFindUniqueOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
findFirst: {
args: Prisma.SettingFindFirstArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload> | null
}
findFirstOrThrow: {
args: Prisma.SettingFindFirstOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
findMany: {
args: Prisma.SettingFindManyArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>[]
}
create: {
args: Prisma.SettingCreateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
createMany: {
args: Prisma.SettingCreateManyArgs<ExtArgs>
result: BatchPayload
}
createManyAndReturn: {
args: Prisma.SettingCreateManyAndReturnArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>[]
}
delete: {
args: Prisma.SettingDeleteArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
update: {
args: Prisma.SettingUpdateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
deleteMany: {
args: Prisma.SettingDeleteManyArgs<ExtArgs>
result: BatchPayload
}
updateMany: {
args: Prisma.SettingUpdateManyArgs<ExtArgs>
result: BatchPayload
}
updateManyAndReturn: {
args: Prisma.SettingUpdateManyAndReturnArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>[]
}
upsert: {
args: Prisma.SettingUpsertArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$SettingPayload>
}
aggregate: {
args: Prisma.SettingAggregateArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.AggregateSetting>
}
groupBy: {
args: Prisma.SettingGroupByArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.SettingGroupByOutputType>[]
}
count: {
args: Prisma.SettingCountArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.SettingCountAggregateOutputType> | number
}
}
}
}
} & {
other: {
@@ -1069,6 +1144,19 @@ export const InvitationScalarFieldEnum = {
export type InvitationScalarFieldEnum = (typeof InvitationScalarFieldEnum)[keyof typeof InvitationScalarFieldEnum]
export const SettingScalarFieldEnum = {
id: 'id',
key: 'key',
value: 'value',
description: 'description',
relation: 'relation',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type SettingScalarFieldEnum = (typeof SettingScalarFieldEnum)[keyof typeof SettingScalarFieldEnum]
export const SortOrder = {
asc: 'asc',
desc: 'desc'
@@ -1249,6 +1337,7 @@ export type GlobalOmitConfig = {
organization?: Prisma.OrganizationOmit
member?: Prisma.MemberOmit
invitation?: Prisma.InvitationOmit
setting?: Prisma.SettingOmit
}
/* Types for Logging */

View File

@@ -57,7 +57,8 @@ export const ModelName = {
Verification: 'Verification',
Organization: 'Organization',
Member: 'Member',
Invitation: 'Invitation'
Invitation: 'Invitation',
Setting: 'Setting'
} as const
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -178,6 +179,19 @@ export const InvitationScalarFieldEnum = {
export type InvitationScalarFieldEnum = (typeof InvitationScalarFieldEnum)[keyof typeof InvitationScalarFieldEnum]
export const SettingScalarFieldEnum = {
id: 'id',
key: 'key',
value: 'value',
description: 'description',
relation: 'relation',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
} as const
export type SettingScalarFieldEnum = (typeof SettingScalarFieldEnum)[keyof typeof SettingScalarFieldEnum]
export const SortOrder = {
asc: 'asc',
desc: 'desc'

View File

@@ -15,4 +15,5 @@ export type * from './models/Verification.ts'
export type * from './models/Organization.ts'
export type * from './models/Member.ts'
export type * from './models/Invitation.ts'
export type * from './models/Setting.ts'
export type * from './commonInputTypes.ts'

View File

@@ -325,7 +325,7 @@ export type AccountScalarWhereWithAggregatesInput = {
}
export type AccountCreateInput = {
id: string
id?: string
accountId: string
providerId: string
accessToken?: string | null
@@ -341,7 +341,7 @@ export type AccountCreateInput = {
}
export type AccountUncheckedCreateInput = {
id: string
id?: string
accountId: string
providerId: string
userId: string
@@ -389,7 +389,7 @@ export type AccountUncheckedUpdateInput = {
}
export type AccountCreateManyInput = {
id: string
id?: string
accountId: string
providerId: string
userId: string
@@ -536,7 +536,7 @@ export type AccountUncheckedUpdateManyWithoutUserNestedInput = {
}
export type AccountCreateWithoutUserInput = {
id: string
id?: string
accountId: string
providerId: string
accessToken?: string | null
@@ -551,7 +551,7 @@ export type AccountCreateWithoutUserInput = {
}
export type AccountUncheckedCreateWithoutUserInput = {
id: string
id?: string
accountId: string
providerId: string
accessToken?: string | null
@@ -611,7 +611,7 @@ export type AccountScalarWhereInput = {
}
export type AccountCreateManyUserInput = {
id: string
id?: string
accountId: string
providerId: string
accessToken?: string | null

View File

@@ -268,7 +268,7 @@ export type InvitationScalarWhereWithAggregatesInput = {
}
export type InvitationCreateInput = {
id: string
id?: string
email: string
role?: string | null
status?: string
@@ -279,7 +279,7 @@ export type InvitationCreateInput = {
}
export type InvitationUncheckedCreateInput = {
id: string
id?: string
organizationId: string
email: string
role?: string | null
@@ -312,7 +312,7 @@ export type InvitationUncheckedUpdateInput = {
}
export type InvitationCreateManyInput = {
id: string
id?: string
organizationId: string
email: string
role?: string | null
@@ -470,7 +470,7 @@ export type InvitationUncheckedUpdateManyWithoutOrganizationNestedInput = {
}
export type InvitationCreateWithoutUserInput = {
id: string
id?: string
email: string
role?: string | null
status?: string
@@ -480,7 +480,7 @@ export type InvitationCreateWithoutUserInput = {
}
export type InvitationUncheckedCreateWithoutUserInput = {
id: string
id?: string
organizationId: string
email: string
role?: string | null
@@ -530,7 +530,7 @@ export type InvitationScalarWhereInput = {
}
export type InvitationCreateWithoutOrganizationInput = {
id: string
id?: string
email: string
role?: string | null
status?: string
@@ -540,7 +540,7 @@ export type InvitationCreateWithoutOrganizationInput = {
}
export type InvitationUncheckedCreateWithoutOrganizationInput = {
id: string
id?: string
email: string
role?: string | null
status?: string
@@ -576,7 +576,7 @@ export type InvitationUpdateManyWithWhereWithoutOrganizationInput = {
}
export type InvitationCreateManyUserInput = {
id: string
id?: string
organizationId: string
email: string
role?: string | null
@@ -616,7 +616,7 @@ export type InvitationUncheckedUpdateManyWithoutUserInput = {
}
export type InvitationCreateManyOrganizationInput = {
id: string
id?: string
email: string
role?: string | null
status?: string

View File

@@ -232,7 +232,7 @@ export type MemberScalarWhereWithAggregatesInput = {
}
export type MemberCreateInput = {
id: string
id?: string
role?: string
createdAt: Date | string
organization: Prisma.OrganizationCreateNestedOneWithoutMembersInput
@@ -240,7 +240,7 @@ export type MemberCreateInput = {
}
export type MemberUncheckedCreateInput = {
id: string
id?: string
organizationId: string
userId: string
role?: string
@@ -264,7 +264,7 @@ export type MemberUncheckedUpdateInput = {
}
export type MemberCreateManyInput = {
id: string
id?: string
organizationId: string
userId: string
role?: string
@@ -404,14 +404,14 @@ export type MemberUncheckedUpdateManyWithoutOrganizationNestedInput = {
}
export type MemberCreateWithoutUserInput = {
id: string
id?: string
role?: string
createdAt: Date | string
organization: Prisma.OrganizationCreateNestedOneWithoutMembersInput
}
export type MemberUncheckedCreateWithoutUserInput = {
id: string
id?: string
organizationId: string
role?: string
createdAt: Date | string
@@ -455,14 +455,14 @@ export type MemberScalarWhereInput = {
}
export type MemberCreateWithoutOrganizationInput = {
id: string
id?: string
role?: string
createdAt: Date | string
user: Prisma.UserCreateNestedOneWithoutMembersInput
}
export type MemberUncheckedCreateWithoutOrganizationInput = {
id: string
id?: string
userId: string
role?: string
createdAt: Date | string
@@ -495,7 +495,7 @@ export type MemberUpdateManyWithWhereWithoutOrganizationInput = {
}
export type MemberCreateManyUserInput = {
id: string
id?: string
organizationId: string
role?: string
createdAt: Date | string
@@ -523,7 +523,7 @@ export type MemberUncheckedUpdateManyWithoutUserInput = {
}
export type MemberCreateManyOrganizationInput = {
id: string
id?: string
userId: string
role?: string
createdAt: Date | string

View File

@@ -256,7 +256,7 @@ export type OrganizationScalarWhereWithAggregatesInput = {
}
export type OrganizationCreateInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -268,7 +268,7 @@ export type OrganizationCreateInput = {
}
export type OrganizationUncheckedCreateInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -304,7 +304,7 @@ export type OrganizationUncheckedUpdateInput = {
}
export type OrganizationCreateManyInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -397,7 +397,7 @@ export type OrganizationUpdateOneRequiredWithoutInvitationsNestedInput = {
}
export type OrganizationCreateWithoutMembersInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -408,7 +408,7 @@ export type OrganizationCreateWithoutMembersInput = {
}
export type OrganizationUncheckedCreateWithoutMembersInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -457,7 +457,7 @@ export type OrganizationUncheckedUpdateWithoutMembersInput = {
}
export type OrganizationCreateWithoutInvitationsInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null
@@ -468,7 +468,7 @@ export type OrganizationCreateWithoutInvitationsInput = {
}
export type OrganizationUncheckedCreateWithoutInvitationsInput = {
id: string
id?: string
name: string
slug: string
logo?: string | null

View File

@@ -289,7 +289,7 @@ export type SessionScalarWhereWithAggregatesInput = {
}
export type SessionCreateInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string
@@ -302,7 +302,7 @@ export type SessionCreateInput = {
}
export type SessionUncheckedCreateInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string
@@ -341,7 +341,7 @@ export type SessionUncheckedUpdateInput = {
}
export type SessionCreateManyInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string
@@ -470,7 +470,7 @@ export type SessionUncheckedUpdateManyWithoutUserNestedInput = {
}
export type SessionCreateWithoutUserInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string
@@ -482,7 +482,7 @@ export type SessionCreateWithoutUserInput = {
}
export type SessionUncheckedCreateWithoutUserInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string
@@ -536,7 +536,7 @@ export type SessionScalarWhereInput = {
}
export type SessionCreateManyUserInput = {
id: string
id?: string
expiresAt: Date | string
token: string
createdAt?: Date | string

File diff suppressed because it is too large Load Diff

View File

@@ -310,7 +310,7 @@ export type UserScalarWhereWithAggregatesInput = {
}
export type UserCreateInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -328,7 +328,7 @@ export type UserCreateInput = {
}
export type UserUncheckedCreateInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -382,7 +382,7 @@ export type UserUncheckedUpdateInput = {
}
export type UserCreateManyInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -551,7 +551,7 @@ export type UserUpdateOneRequiredWithoutInvitationsNestedInput = {
}
export type UserCreateWithoutSessionsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -568,7 +568,7 @@ export type UserCreateWithoutSessionsInput = {
}
export type UserUncheckedCreateWithoutSessionsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -635,7 +635,7 @@ export type UserUncheckedUpdateWithoutSessionsInput = {
}
export type UserCreateWithoutAccountsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -652,7 +652,7 @@ export type UserCreateWithoutAccountsInput = {
}
export type UserUncheckedCreateWithoutAccountsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -719,7 +719,7 @@ export type UserUncheckedUpdateWithoutAccountsInput = {
}
export type UserCreateWithoutMembersInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -736,7 +736,7 @@ export type UserCreateWithoutMembersInput = {
}
export type UserUncheckedCreateWithoutMembersInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -803,7 +803,7 @@ export type UserUncheckedUpdateWithoutMembersInput = {
}
export type UserCreateWithoutInvitationsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean
@@ -820,7 +820,7 @@ export type UserCreateWithoutInvitationsInput = {
}
export type UserUncheckedCreateWithoutInvitationsInput = {
id: string
id?: string
name: string
email: string
emailVerified?: boolean

View File

@@ -238,7 +238,7 @@ export type VerificationScalarWhereWithAggregatesInput = {
}
export type VerificationCreateInput = {
id: string
id?: string
identifier: string
value: string
expiresAt: Date | string
@@ -247,7 +247,7 @@ export type VerificationCreateInput = {
}
export type VerificationUncheckedCreateInput = {
id: string
id?: string
identifier: string
value: string
expiresAt: Date | string
@@ -274,7 +274,7 @@ export type VerificationUncheckedUpdateInput = {
}
export type VerificationCreateManyInput = {
id: string
id?: string
identifier: string
value: string
expiresAt: Date | string