transform core api codes into this project, update modules as admin/pos context modules
This commit is contained in:
+7
-13
@@ -1,16 +1,13 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { AppController } from './app.controller'
|
||||
import { AppService } from './app.service'
|
||||
import { AdminModule } from './modules/admin/admin.module'
|
||||
import { AuthModule } from './modules/auth/auth.module'
|
||||
import { ConfigModule } from './modules/config/config.module'
|
||||
import { CustomersModule } from './modules/customers/customers.module'
|
||||
import { EnumsModule } from './modules/enums/enums.module'
|
||||
import { GoodCategoriesModule } from './modules/good-categories/good-categories.module'
|
||||
import { GoodsModule } from './modules/goods/goods.module'
|
||||
import { PosModule } from './modules/pos/pos.module'
|
||||
import { SalesInvoiceItemsModule } from './modules/pos/sales-invoices/sales-invoice-items/sales-invoice-items.module'
|
||||
import { SalesInvoicePaymentsModule } from './modules/pos/sales-invoices/sales-invoice-payments/sales-invoice-payments.module'
|
||||
import { ProfileModule } from './modules/profile/profile.module'
|
||||
import { SalesInvoiceItemsModule } from './modules/sales-invoice-items/sales-invoice-items.module'
|
||||
import { SalesInvoicePaymentsModule } from './modules/sales-invoice-payments/sales-invoice-payments.module'
|
||||
import { SalesInvoicesModule } from './modules/sales-invoices/sales-invoices.module'
|
||||
import { ServiceCategoriesModule } from './modules/service-categories/service-categories.module'
|
||||
import { ServicesModule } from './modules/services/services.module'
|
||||
import { TriggerLogsModule } from './modules/trigger-logs/trigger-logs.module'
|
||||
@@ -20,20 +17,17 @@ import { PrismaModule } from './prisma/prisma.module'
|
||||
@Module({
|
||||
imports: [
|
||||
PrismaModule,
|
||||
EnumsModule,
|
||||
AdminModule,
|
||||
PosModule,
|
||||
AuthModule,
|
||||
CustomersModule,
|
||||
GoodCategoriesModule,
|
||||
GoodsModule,
|
||||
SalesInvoiceItemsModule,
|
||||
SalesInvoicePaymentsModule,
|
||||
SalesInvoicesModule,
|
||||
ServiceCategoriesModule,
|
||||
ServicesModule,
|
||||
TriggerLogsModule,
|
||||
UploadersModule,
|
||||
ConfigModule,
|
||||
ProfileModule,
|
||||
EnumsModule,
|
||||
],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
COUNT: 'تعداد',
|
||||
GRAM: 'گرم',
|
||||
KILO_GRAM: 'کیلوگرم',
|
||||
LITER: 'لیتر',
|
||||
MILLILITER: 'میلیلیتر',
|
||||
STANDARD: 'استاندارد',
|
||||
GOLD: 'طلا',
|
||||
ACTIVE: 'فعال',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import enums from './enums'
|
||||
|
||||
export default {
|
||||
enums,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// src/common/database/transaction.helper.ts
|
||||
import { PrismaService } from '../../prisma/prisma.service'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
|
||||
export async function withTransaction<T>(
|
||||
prisma: PrismaService,
|
||||
|
||||
+10
-10
@@ -1,18 +1,18 @@
|
||||
export enum TokenType {
|
||||
ACCESS,
|
||||
REFRESH,
|
||||
ACCESS = 'ACCESS',
|
||||
REFRESH = 'REFRESH',
|
||||
}
|
||||
|
||||
export enum AccountType {
|
||||
PARTNER,
|
||||
BUSINESS,
|
||||
ADMIN,
|
||||
PROVIDER,
|
||||
POS,
|
||||
PARTNER = 'PARTNER',
|
||||
BUSINESS = 'BUSINESS',
|
||||
ADMIN = 'ADMIN',
|
||||
PROVIDER = 'PROVIDER',
|
||||
POS = 'POS',
|
||||
}
|
||||
|
||||
export enum GoldKarat {
|
||||
KARAT_18 = 18,
|
||||
KARAT_21 = 21,
|
||||
KARAT_24 = 24,
|
||||
KARAT_18 = '18',
|
||||
KARAT_21 = '21',
|
||||
KARAT_24 = '24',
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
HttpStatus,
|
||||
} from '@nestjs/common'
|
||||
import type { Request, Response } from 'express'
|
||||
import { Prisma } from '../../generated/prisma/client'
|
||||
import { Prisma } from 'generated/prisma/client'
|
||||
|
||||
@Catch()
|
||||
export class PrismaExceptionFilter implements ExceptionFilter {
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
import {
|
||||
CanActivate,
|
||||
ExecutionContext,
|
||||
Injectable,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common'
|
||||
import { Reflector } from '@nestjs/core'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||
import { IWithJWTPayloadRequest } from '../models/token-model'
|
||||
|
||||
@Injectable()
|
||||
export class JwtAuthGuard implements CanActivate {
|
||||
constructor(
|
||||
private jwt: JwtService,
|
||||
private reflector: Reflector,
|
||||
) {}
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
||||
context.getHandler(),
|
||||
context.getClass(),
|
||||
])
|
||||
if (isPublic) return true
|
||||
|
||||
const req = context.switchToHttp().getRequest<IWithJWTPayloadRequest>()
|
||||
|
||||
let token: string | undefined = req.cookies?.accessToken
|
||||
if (!token) {
|
||||
const authHeader = (req.headers.authorization || req.headers.Authorization) as
|
||||
| string
|
||||
| undefined
|
||||
if (authHeader && authHeader.startsWith('Bearer ')) {
|
||||
token = authHeader.slice(7)
|
||||
}
|
||||
}
|
||||
|
||||
if (!token) throw new UnauthorizedException('Missing access token')
|
||||
|
||||
try {
|
||||
const payload = this.jwt.verify(token, {
|
||||
secret: process.env.JWT_SECRET || 'secret',
|
||||
})
|
||||
|
||||
if (payload.type !== 'POS')
|
||||
throw new UnauthorizedException('Invalid or expired token')
|
||||
|
||||
// Set the typed dataPayload to the request
|
||||
req.dataPayload = payload
|
||||
|
||||
return true
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
throw new UnauthorizedException('Invalid or expired token')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
} from '@nestjs/common'
|
||||
import { Reflector } from '@nestjs/core'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { IS_PUBLIC_KEY } from '../../common/decorators/public.decorator'
|
||||
import { IWithJWTPayloadRequest } from '../../common/models/token-model'
|
||||
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||
import { IWithJWTPayloadRequest } from '../models/token-model'
|
||||
|
||||
@Injectable()
|
||||
export class JwtAuthGuard implements CanActivate {
|
||||
@@ -17,6 +17,8 @@ export class JwtAuthGuard implements CanActivate {
|
||||
) {}
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
console.log('asd')
|
||||
|
||||
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
||||
context.getHandler(),
|
||||
context.getClass(),
|
||||
@@ -42,8 +44,8 @@ export class JwtAuthGuard implements CanActivate {
|
||||
secret: process.env.JWT_SECRET || 'secret',
|
||||
})
|
||||
|
||||
if (payload.type !== 'POS')
|
||||
throw new UnauthorizedException('Invalid or expired token')
|
||||
// if (payload.type !== 'POS')
|
||||
// throw new UnauthorizedException('Invalid or expired token')
|
||||
|
||||
// Set the typed dataPayload to the request
|
||||
req.dataPayload = payload
|
||||
@@ -76,12 +76,12 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
||||
break
|
||||
case 'list':
|
||||
payload = Array.isArray(wrapped.items) ? wrapped.items : []
|
||||
meta = {
|
||||
totalRecords: payload.length,
|
||||
totalPages: 1,
|
||||
page: 1,
|
||||
perPage: payload.length,
|
||||
}
|
||||
// meta = {
|
||||
// totalRecords: payload.length,
|
||||
// totalPages: 1,
|
||||
// page: 1,
|
||||
// perPage: payload.length,
|
||||
// }
|
||||
break
|
||||
case 'paginate': {
|
||||
const items = Array.isArray(wrapped.items) ? wrapped.items : []
|
||||
@@ -193,7 +193,7 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
||||
}
|
||||
}
|
||||
|
||||
if (meta)
|
||||
if (meta || ['list', 'paginate'].includes((data as any).__mapped))
|
||||
return {
|
||||
data: data.items,
|
||||
meta,
|
||||
|
||||
@@ -5,10 +5,17 @@
|
||||
* the global `ResponseMappingInterceptor` understands and normalizes.
|
||||
*/
|
||||
export type MapperWrapper<T> =
|
||||
| { __mapped: 'create' | 'update' | 'single' | 'delete'; data: T }
|
||||
| { __mapped: 'create' | 'update' | 'single'; data: T }
|
||||
| { __mapped: 'list'; items: T[] }
|
||||
| { __mapped: 'paginate'; items: T[]; total: number; page?: number; perPage?: number }
|
||||
| { __mapped: 'paginate'; items: T[]; count: number; page?: number; pageSize?: number }
|
||||
| { __mapped: 'sequelize'; rows: T[]; count: number; page?: number; perPage?: number }
|
||||
| { __mapped: 'delete' }
|
||||
|
||||
interface IPaginateMeta {
|
||||
count: number
|
||||
page?: number
|
||||
pageSize?: number
|
||||
}
|
||||
|
||||
export const ResponseMapper = {
|
||||
create<T>(item: T): MapperWrapper<T> {
|
||||
@@ -23,20 +30,20 @@ export const ResponseMapper = {
|
||||
return { __mapped: 'single', data: item }
|
||||
},
|
||||
|
||||
delete<T>(item: T): MapperWrapper<T> {
|
||||
return { __mapped: 'delete', data: item }
|
||||
delete(): MapperWrapper<boolean> {
|
||||
return { __mapped: 'delete' }
|
||||
},
|
||||
|
||||
list<T>(items: T[]): MapperWrapper<T> {
|
||||
return { __mapped: 'list', items }
|
||||
},
|
||||
|
||||
paginate<T>(items: T[], total: number, page = 1, perPage = items.length) {
|
||||
return { __mapped: 'paginate', items, total, page, perPage }
|
||||
paginate<T>(items: T[], { count, page = 1, pageSize: perPage }: IPaginateMeta) {
|
||||
return { __mapped: 'paginate', items, count, page, perPage }
|
||||
},
|
||||
|
||||
sequelizePaginate<T>(rows: T[], count: number, page = 1, perPage = rows.length) {
|
||||
return { __mapped: 'sequelize', rows, count, page, perPage }
|
||||
sequelizePaginate<T>(rows: T[], count: number, page = 1, pageSize = rows.length) {
|
||||
return { __mapped: 'sequelize', rows, count, page, pageSize }
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { UnauthorizedException } from '@nestjs/common'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { Request } from 'express'
|
||||
import { AccessTokenPayload } from 'modules/auth/models'
|
||||
|
||||
export function getAccountIdFromJwt(req: Request, jwtService: JwtService): string | null {
|
||||
// Try to get token from Authorization header
|
||||
|
||||
let token = req.cookies?.accessToken
|
||||
|
||||
if (!token) {
|
||||
const authHeader = (req.headers.authorization || req.headers.Authorization) as
|
||||
| string
|
||||
| undefined
|
||||
if (authHeader && authHeader.startsWith('Bearer ')) {
|
||||
token = authHeader.slice(7)
|
||||
}
|
||||
}
|
||||
if (!token) throw new UnauthorizedException('Missing accessToken cookie')
|
||||
|
||||
// const token = authHeader.replace('Bearer ', '')
|
||||
try {
|
||||
const payload = jwtService.decode(token) as AccessTokenPayload
|
||||
console.log(payload)
|
||||
|
||||
return payload?.account_id || null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as bcrypt from 'bcrypt'
|
||||
|
||||
export class PasswordUtil {
|
||||
static async hash(password: string, saltRounds = 10): Promise<string> {
|
||||
return bcrypt.hash(password, saltRounds)
|
||||
}
|
||||
|
||||
static async compare(password: string, hashedPassword: string): Promise<boolean> {
|
||||
return bcrypt.compare(password, hashedPassword)
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,81 @@ import * as Prisma from './internal/prismaNamespaceBrowser.js'
|
||||
export { Prisma }
|
||||
export * as $Enums from './enums.js'
|
||||
export * from './enums.js';
|
||||
/**
|
||||
* Model Token
|
||||
*
|
||||
*/
|
||||
export type Token = Prisma.TokenModel
|
||||
/**
|
||||
* Model VerificationCode
|
||||
*
|
||||
*/
|
||||
export type VerificationCode = Prisma.VerificationCodeModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model DeviceBrand
|
||||
*
|
||||
*/
|
||||
export type DeviceBrand = Prisma.DeviceBrandModel
|
||||
/**
|
||||
* Model Device
|
||||
*
|
||||
*/
|
||||
export type Device = Prisma.DeviceModel
|
||||
/**
|
||||
* Model License
|
||||
*
|
||||
*/
|
||||
export type License = Prisma.LicenseModel
|
||||
/**
|
||||
* Model Partner
|
||||
*
|
||||
*/
|
||||
export type Partner = Prisma.PartnerModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Account
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model Provider
|
||||
*
|
||||
*/
|
||||
export type Provider = Prisma.ProviderModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
*/
|
||||
export type TriggerLog = Prisma.TriggerLogModel
|
||||
/**
|
||||
* Model UserDevices
|
||||
*
|
||||
*/
|
||||
export type UserDevices = Prisma.UserDevicesModel
|
||||
/**
|
||||
* Model Customer
|
||||
*
|
||||
@@ -32,11 +107,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
||||
*
|
||||
*/
|
||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||
/**
|
||||
* Model Device
|
||||
*
|
||||
*/
|
||||
export type Device = Prisma.DeviceModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
@@ -47,11 +117,6 @@ export type Good = Prisma.GoodModel
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
*/
|
||||
export type TriggerLog = Prisma.TriggerLogModel
|
||||
/**
|
||||
* Model SalesInvoice
|
||||
*
|
||||
|
||||
@@ -27,8 +27,8 @@ export * from "./enums.js"
|
||||
* @example
|
||||
* ```
|
||||
* const prisma = new PrismaClient()
|
||||
* // Fetch zero or more Customers
|
||||
* const customers = await prisma.customer.findMany()
|
||||
* // Fetch zero or more Tokens
|
||||
* const tokens = await prisma.token.findMany()
|
||||
* ```
|
||||
*
|
||||
* Read more in our [docs](https://pris.ly/d/client).
|
||||
@@ -37,6 +37,81 @@ 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 Token
|
||||
*
|
||||
*/
|
||||
export type Token = Prisma.TokenModel
|
||||
/**
|
||||
* Model VerificationCode
|
||||
*
|
||||
*/
|
||||
export type VerificationCode = Prisma.VerificationCodeModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model DeviceBrand
|
||||
*
|
||||
*/
|
||||
export type DeviceBrand = Prisma.DeviceBrandModel
|
||||
/**
|
||||
* Model Device
|
||||
*
|
||||
*/
|
||||
export type Device = Prisma.DeviceModel
|
||||
/**
|
||||
* Model License
|
||||
*
|
||||
*/
|
||||
export type License = Prisma.LicenseModel
|
||||
/**
|
||||
* Model Partner
|
||||
*
|
||||
*/
|
||||
export type Partner = Prisma.PartnerModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Account
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model Provider
|
||||
*
|
||||
*/
|
||||
export type Provider = Prisma.ProviderModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
*/
|
||||
export type TriggerLog = Prisma.TriggerLogModel
|
||||
/**
|
||||
* Model UserDevices
|
||||
*
|
||||
*/
|
||||
export type UserDevices = Prisma.UserDevicesModel
|
||||
/**
|
||||
* Model Customer
|
||||
*
|
||||
@@ -52,11 +127,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
||||
*
|
||||
*/
|
||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||
/**
|
||||
* Model Device
|
||||
*
|
||||
*/
|
||||
export type Device = Prisma.DeviceModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
@@ -67,11 +137,6 @@ export type Good = Prisma.GoodModel
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
*/
|
||||
export type TriggerLog = Prisma.TriggerLogModel
|
||||
/**
|
||||
* Model SalesInvoice
|
||||
*
|
||||
|
||||
@@ -29,6 +29,13 @@ export type StringFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type EnumTokenTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TokenType[]
|
||||
notIn?: $Enums.TokenType[]
|
||||
not?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel> | $Enums.TokenType
|
||||
}
|
||||
|
||||
export type DateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
@@ -40,6 +47,211 @@ export type DateTimeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||
}
|
||||
|
||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTokenTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TokenType[]
|
||||
notIn?: $Enums.TokenType[]
|
||||
not?: Prisma.NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel> | $Enums.TokenType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
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 BoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type StringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | 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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type SortOrderInput = {
|
||||
sort: Prisma.SortOrder
|
||||
nulls?: Prisma.NullsOrder
|
||||
}
|
||||
|
||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | 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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumPOSStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||
}
|
||||
|
||||
export type EnumPOSTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSType[]
|
||||
notIn?: $Enums.POSType[]
|
||||
not?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel> | $Enums.POSType
|
||||
}
|
||||
|
||||
export type EnumPOSStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel> | $Enums.POSStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumPOSTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSType[]
|
||||
notIn?: $Enums.POSType[]
|
||||
not?: Prisma.NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel> | $Enums.POSType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumLicenseStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.LicenseStatus[]
|
||||
notIn?: $Enums.LicenseStatus[]
|
||||
not?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||
}
|
||||
|
||||
export type EnumLicenseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.LicenseStatus[]
|
||||
notIn?: $Enums.LicenseStatus[]
|
||||
not?: Prisma.NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumAccountTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountType[]
|
||||
notIn?: $Enums.AccountType[]
|
||||
not?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel> | $Enums.AccountType
|
||||
}
|
||||
|
||||
export type EnumAccountStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountStatus[]
|
||||
notIn?: $Enums.AccountStatus[]
|
||||
not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
|
||||
}
|
||||
|
||||
export type EnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountType[]
|
||||
notIn?: $Enums.AccountType[]
|
||||
not?: Prisma.NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountStatus[]
|
||||
notIn?: $Enums.AccountStatus[]
|
||||
not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
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 IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
@@ -63,43 +275,6 @@ export type BoolNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type SortOrderInput = {
|
||||
sort: Prisma.SortOrder
|
||||
nulls?: Prisma.NullsOrder
|
||||
}
|
||||
|
||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
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 DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
@@ -132,37 +307,31 @@ export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type StringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | 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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
export type DecimalNullableFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | 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>
|
||||
search?: string
|
||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DecimalFilter<$PrismaModel = never> = {
|
||||
@@ -176,49 +345,6 @@ export type DecimalFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
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 IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonNullableFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||
@@ -243,6 +369,22 @@ export type JsonNullableFilterBase<$PrismaModel = never> = {
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
@@ -277,13 +419,6 @@ export type EnumUnitTypeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||
}
|
||||
|
||||
export type EnumSalesInvoiceItemPricingModelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
||||
}
|
||||
|
||||
export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
@@ -294,16 +429,6 @@ export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.PaymentMethodType[]
|
||||
@@ -336,6 +461,13 @@ export type NestedStringFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type NestedEnumTokenTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TokenType[]
|
||||
notIn?: $Enums.TokenType[]
|
||||
not?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel> | $Enums.TokenType
|
||||
}
|
||||
|
||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
@@ -347,29 +479,6 @@ export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | 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 NestedEnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
||||
}
|
||||
|
||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
@@ -399,6 +508,16 @@ export type NestedIntFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TokenType[]
|
||||
notIn?: $Enums.TokenType[]
|
||||
not?: Prisma.NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel> | $Enums.TokenType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
@@ -413,47 +532,17 @@ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | 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 NestedBoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | 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 NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel> | $Enums.CustomerType
|
||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$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>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||
@@ -489,31 +578,100 @@ export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | 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 NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||
}
|
||||
|
||||
export type NestedEnumPOSTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSType[]
|
||||
notIn?: $Enums.POSType[]
|
||||
not?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel> | $Enums.POSType
|
||||
}
|
||||
|
||||
export type NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel> | $Enums.POSStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSType[]
|
||||
notIn?: $Enums.POSType[]
|
||||
not?: Prisma.NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel> | $Enums.POSType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumLicenseStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.LicenseStatus[]
|
||||
notIn?: $Enums.LicenseStatus[]
|
||||
not?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||
}
|
||||
|
||||
export type NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.LicenseStatus[]
|
||||
notIn?: $Enums.LicenseStatus[]
|
||||
not?: Prisma.NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumAccountTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountType[]
|
||||
notIn?: $Enums.AccountType[]
|
||||
not?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel> | $Enums.AccountType
|
||||
}
|
||||
|
||||
export type NestedEnumAccountStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountStatus[]
|
||||
notIn?: $Enums.AccountStatus[]
|
||||
not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
|
||||
}
|
||||
|
||||
export type NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountType[]
|
||||
notIn?: $Enums.AccountType[]
|
||||
not?: Prisma.NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.AccountStatus[]
|
||||
notIn?: $Enums.AccountStatus[]
|
||||
not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
@@ -543,6 +701,115 @@ export type NestedFloatFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | 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 NestedEnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
||||
}
|
||||
|
||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | 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 NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel> | $Enums.CustomerType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$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 NestedDecimalNullableFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonNullableFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||
@@ -574,13 +841,6 @@ export type NestedEnumUnitTypeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||
}
|
||||
|
||||
export type NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
||||
}
|
||||
|
||||
export type NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
@@ -591,16 +851,6 @@ export type NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.PaymentMethodType[]
|
||||
|
||||
@@ -43,6 +43,7 @@ export const UnitType = {
|
||||
COUNT: 'COUNT',
|
||||
GRAM: 'GRAM',
|
||||
KILOGRAM: 'KILOGRAM',
|
||||
MILLILITER: 'MILLILITER',
|
||||
LITER: 'LITER',
|
||||
METER: 'METER',
|
||||
HOUR: 'HOUR'
|
||||
@@ -51,6 +52,14 @@ export const UnitType = {
|
||||
export type UnitType = (typeof UnitType)[keyof typeof UnitType]
|
||||
|
||||
|
||||
export const GoodPricingModel = {
|
||||
STANDARD: 'STANDARD',
|
||||
GOLD: 'GOLD'
|
||||
} as const
|
||||
|
||||
export type GoodPricingModel = (typeof GoodPricingModel)[keyof typeof GoodPricingModel]
|
||||
|
||||
|
||||
export const CustomerType = {
|
||||
INDIVIDUAL: 'INDIVIDUAL',
|
||||
LEGAL: 'LEGAL',
|
||||
@@ -60,9 +69,121 @@ export const CustomerType = {
|
||||
export type CustomerType = (typeof CustomerType)[keyof typeof CustomerType]
|
||||
|
||||
|
||||
export const SalesInvoiceItemPricingModel = {
|
||||
STANDARD: 'STANDARD',
|
||||
GOLD: 'GOLD'
|
||||
export const UserStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
INACTIVE: 'INACTIVE'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceItemPricingModel = (typeof SalesInvoiceItemPricingModel)[keyof typeof SalesInvoiceItemPricingModel]
|
||||
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
|
||||
|
||||
|
||||
export const AccountRole = {
|
||||
OWNER: 'OWNER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
ACCOUNTANT: 'ACCOUNTANT'
|
||||
} as const
|
||||
|
||||
export type AccountRole = (typeof AccountRole)[keyof typeof AccountRole]
|
||||
|
||||
|
||||
export const AccountStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus]
|
||||
|
||||
|
||||
export const POSStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
DISABLED: 'DISABLED'
|
||||
} as const
|
||||
|
||||
export type POSStatus = (typeof POSStatus)[keyof typeof POSStatus]
|
||||
|
||||
|
||||
export const POSRole = {
|
||||
MANAGER: 'MANAGER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
VIEWER: 'VIEWER'
|
||||
} as const
|
||||
|
||||
export type POSRole = (typeof POSRole)[keyof typeof POSRole]
|
||||
|
||||
|
||||
export const LicenseType = {
|
||||
BASIC: 'BASIC',
|
||||
PRO: 'PRO',
|
||||
ENTERPRISE: 'ENTERPRISE'
|
||||
} as const
|
||||
|
||||
export type LicenseType = (typeof LicenseType)[keyof typeof LicenseType]
|
||||
|
||||
|
||||
export const LicenseStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
EXPIRED: 'EXPIRED',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type LicenseStatus = (typeof LicenseStatus)[keyof typeof LicenseStatus]
|
||||
|
||||
|
||||
export const POSType = {
|
||||
PSP: 'PSP',
|
||||
MOBILE: 'MOBILE',
|
||||
API: 'API'
|
||||
} as const
|
||||
|
||||
export type POSType = (typeof POSType)[keyof typeof POSType]
|
||||
|
||||
|
||||
export const UserType = {
|
||||
LEGAL: 'LEGAL',
|
||||
INDIVIDUAL: 'INDIVIDUAL'
|
||||
} as const
|
||||
|
||||
export type UserType = (typeof UserType)[keyof typeof UserType]
|
||||
|
||||
|
||||
export const AccountType = {
|
||||
PARTNER: 'PARTNER',
|
||||
BUSINESS: 'BUSINESS',
|
||||
ADMIN: 'ADMIN',
|
||||
PROVIDER: 'PROVIDER',
|
||||
POS: 'POS'
|
||||
} as const
|
||||
|
||||
export type AccountType = (typeof AccountType)[keyof typeof AccountType]
|
||||
|
||||
|
||||
export const PartnerRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type PartnerRole = (typeof PartnerRole)[keyof typeof PartnerRole]
|
||||
|
||||
|
||||
export const BusinessRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole]
|
||||
|
||||
|
||||
export const ProviderRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR'
|
||||
} as const
|
||||
|
||||
export type ProviderRole = (typeof ProviderRole)[keyof typeof ProviderRole]
|
||||
|
||||
|
||||
export const TokenType = {
|
||||
ACCESS: 'ACCESS',
|
||||
REFRESH: 'REFRESH'
|
||||
} as const
|
||||
|
||||
export type TokenType = (typeof TokenType)[keyof typeof TokenType]
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -51,13 +51,26 @@ export const AnyNull = runtime.AnyNull
|
||||
|
||||
|
||||
export const ModelName = {
|
||||
Token: 'Token',
|
||||
VerificationCode: 'VerificationCode',
|
||||
Guild: 'Guild',
|
||||
BusinessActivity: 'BusinessActivity',
|
||||
Complex: 'Complex',
|
||||
Pos: 'Pos',
|
||||
DeviceBrand: 'DeviceBrand',
|
||||
Device: 'Device',
|
||||
License: 'License',
|
||||
Partner: 'Partner',
|
||||
User: 'User',
|
||||
Account: 'Account',
|
||||
Provider: 'Provider',
|
||||
TriggerLog: 'TriggerLog',
|
||||
UserDevices: 'UserDevices',
|
||||
Customer: 'Customer',
|
||||
CustomerIndividual: 'CustomerIndividual',
|
||||
CustomerLegal: 'CustomerLegal',
|
||||
Device: 'Device',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
TriggerLog: 'TriggerLog',
|
||||
SalesInvoice: 'SalesInvoice',
|
||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||
@@ -81,6 +94,187 @@ export const TransactionIsolationLevel = {
|
||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||
|
||||
|
||||
export const TokenScalarFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
type: 'type',
|
||||
created_at: 'created_at',
|
||||
expires_at: 'expires_at',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type TokenScalarFieldEnum = (typeof TokenScalarFieldEnum)[keyof typeof TokenScalarFieldEnum]
|
||||
|
||||
|
||||
export const VerificationCodeScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
is_used: 'is_used',
|
||||
created_at: 'created_at',
|
||||
expires_at: 'expires_at',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type VerificationCodeScalarFieldEnum = (typeof VerificationCodeScalarFieldEnum)[keyof typeof VerificationCodeScalarFieldEnum]
|
||||
|
||||
|
||||
export const GuildScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type GuildScalarFieldEnum = (typeof GuildScalarFieldEnum)[keyof typeof GuildScalarFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
created_at: 'created_at',
|
||||
guild_id: 'guild_id',
|
||||
owner_id: 'owner_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityScalarFieldEnum = (typeof BusinessActivityScalarFieldEnum)[keyof typeof BusinessActivityScalarFieldEnum]
|
||||
|
||||
|
||||
export const ComplexScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
address: 'address',
|
||||
tax_id: 'tax_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeof ComplexScalarFieldEnum]
|
||||
|
||||
|
||||
export const PosScalarFieldEnum = {
|
||||
id: 'id',
|
||||
serial: 'serial',
|
||||
model: 'model',
|
||||
status: 'status',
|
||||
pos_type: 'pos_type',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
complex_id: 'complex_id',
|
||||
device_id: 'device_id',
|
||||
provider_id: 'provider_id'
|
||||
} as const
|
||||
|
||||
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||
|
||||
|
||||
export const DeviceBrandScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type DeviceBrandScalarFieldEnum = (typeof DeviceBrandScalarFieldEnum)[keyof typeof DeviceBrandScalarFieldEnum]
|
||||
|
||||
|
||||
export const DeviceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
os_version: 'os_version',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
brand_id: 'brand_id'
|
||||
} as const
|
||||
|
||||
export type DeviceScalarFieldEnum = (typeof DeviceScalarFieldEnum)[keyof typeof DeviceScalarFieldEnum]
|
||||
|
||||
|
||||
export const LicenseScalarFieldEnum = {
|
||||
id: 'id',
|
||||
starts_at: 'starts_at',
|
||||
expires_at: 'expires_at',
|
||||
status: 'status',
|
||||
pos_id: 'pos_id',
|
||||
partner_id: 'partner_id'
|
||||
} as const
|
||||
|
||||
export type LicenseScalarFieldEnum = (typeof LicenseScalarFieldEnum)[keyof typeof LicenseScalarFieldEnum]
|
||||
|
||||
|
||||
export const PartnerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type PartnerScalarFieldEnum = (typeof PartnerScalarFieldEnum)[keyof typeof PartnerScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
created_at: 'created_at',
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name'
|
||||
} as const
|
||||
|
||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||
|
||||
|
||||
export const AccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
type: 'type',
|
||||
status: 'status',
|
||||
password: 'password',
|
||||
created_at: 'created_at',
|
||||
user_id: 'user_id',
|
||||
partner_id: 'partner_id',
|
||||
business_id: 'business_id',
|
||||
provider_id: 'provider_id',
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const ProviderScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type ProviderScalarFieldEnum = (typeof ProviderScalarFieldEnum)[keyof typeof ProviderScalarFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
createdAt: 'createdAt',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserDevicesScalarFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
build_number: 'build_number',
|
||||
uuid: 'uuid',
|
||||
platform: 'platform',
|
||||
brand: 'brand',
|
||||
model: 'model',
|
||||
device: 'device',
|
||||
os_version: 'os_version',
|
||||
sdk_version: 'sdk_version',
|
||||
release_number: 'release_number',
|
||||
browser_name: 'browser_name',
|
||||
fcm_token: 'fcm_token'
|
||||
} as const
|
||||
|
||||
export type UserDevicesScalarFieldEnum = (typeof UserDevicesScalarFieldEnum)[keyof typeof UserDevicesScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
created_at: 'created_at',
|
||||
@@ -119,25 +313,6 @@ export const CustomerLegalScalarFieldEnum = {
|
||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||
|
||||
|
||||
export const DeviceScalarFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
build_number: 'build_number',
|
||||
uuid: 'uuid',
|
||||
platform: 'platform',
|
||||
brand: 'brand',
|
||||
model: 'model',
|
||||
device: 'device',
|
||||
os_version: 'os_version',
|
||||
sdk_version: 'sdk_version',
|
||||
release_number: 'release_number',
|
||||
browser_name: 'browser_name',
|
||||
fcm_token: 'fcm_token'
|
||||
} as const
|
||||
|
||||
export type DeviceScalarFieldEnum = (typeof DeviceScalarFieldEnum)[keyof typeof DeviceScalarFieldEnum]
|
||||
|
||||
|
||||
export const GoodScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -145,13 +320,14 @@ export const GoodScalarFieldEnum = {
|
||||
sku: 'sku',
|
||||
local_sku: 'local_sku',
|
||||
barcode: 'barcode',
|
||||
base_sale_price: 'base_sale_price',
|
||||
is_default_guild_good: 'is_default_guild_good',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at',
|
||||
complex_id: 'complex_id',
|
||||
category_id: 'category_id',
|
||||
base_sale_price: 'base_sale_price',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
guild_id: 'guild_id'
|
||||
} as const
|
||||
|
||||
export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum]
|
||||
@@ -162,8 +338,9 @@ export const GoodCategoryScalarFieldEnum = {
|
||||
name: 'name',
|
||||
description: 'description',
|
||||
image_url: 'image_url',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id',
|
||||
is_default_guild_good: 'is_default_guild_good',
|
||||
guild_id: 'guild_id',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at'
|
||||
@@ -172,16 +349,6 @@ export const GoodCategoryScalarFieldEnum = {
|
||||
export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
createdAt: 'createdAt',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
@@ -208,7 +375,6 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
||||
created_at: 'created_at',
|
||||
discount: 'discount',
|
||||
notes: 'notes',
|
||||
pricingModel: 'pricingModel',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id',
|
||||
@@ -280,6 +446,24 @@ export const NullableJsonNullValueInput = {
|
||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||
|
||||
|
||||
export const TokenOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
token: 'token',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type TokenOrderByRelevanceFieldEnum = (typeof TokenOrderByRelevanceFieldEnum)[keyof typeof TokenOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const VerificationCodeOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type VerificationCodeOrderByRelevanceFieldEnum = (typeof VerificationCodeOrderByRelevanceFieldEnum)[keyof typeof VerificationCodeOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
@@ -288,6 +472,145 @@ export const NullsOrder = {
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const GuildOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldEnum)[keyof typeof GuildOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
guild_id: 'guild_id',
|
||||
owner_id: 'owner_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityOrderByRelevanceFieldEnum = (typeof BusinessActivityOrderByRelevanceFieldEnum)[keyof typeof BusinessActivityOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ComplexOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
address: 'address',
|
||||
tax_id: 'tax_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexOrderByRelevanceFieldEnum = (typeof ComplexOrderByRelevanceFieldEnum)[keyof typeof ComplexOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const PosOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
serial: 'serial',
|
||||
model: 'model',
|
||||
complex_id: 'complex_id',
|
||||
device_id: 'device_id',
|
||||
provider_id: 'provider_id'
|
||||
} as const
|
||||
|
||||
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const DeviceBrandOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type DeviceBrandOrderByRelevanceFieldEnum = (typeof DeviceBrandOrderByRelevanceFieldEnum)[keyof typeof DeviceBrandOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const DeviceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
os_version: 'os_version',
|
||||
brand_id: 'brand_id'
|
||||
} as const
|
||||
|
||||
export type DeviceOrderByRelevanceFieldEnum = (typeof DeviceOrderByRelevanceFieldEnum)[keyof typeof DeviceOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const LicenseOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
pos_id: 'pos_id',
|
||||
partner_id: 'partner_id'
|
||||
} as const
|
||||
|
||||
export type LicenseOrderByRelevanceFieldEnum = (typeof LicenseOrderByRelevanceFieldEnum)[keyof typeof LicenseOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const PartnerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type PartnerOrderByRelevanceFieldEnum = (typeof PartnerOrderByRelevanceFieldEnum)[keyof typeof PartnerOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const UserOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name'
|
||||
} as const
|
||||
|
||||
export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const AccountOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
username: 'username',
|
||||
password: 'password',
|
||||
user_id: 'user_id',
|
||||
partner_id: 'partner_id',
|
||||
business_id: 'business_id',
|
||||
provider_id: 'provider_id',
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type AccountOrderByRelevanceFieldEnum = (typeof AccountOrderByRelevanceFieldEnum)[keyof typeof AccountOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ProviderOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
} as const
|
||||
|
||||
export type ProviderOrderByRelevanceFieldEnum = (typeof ProviderOrderByRelevanceFieldEnum)[keyof typeof ProviderOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||
message: 'message',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const UserDevicesOrderByRelevanceFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
build_number: 'build_number',
|
||||
uuid: 'uuid',
|
||||
platform: 'platform',
|
||||
brand: 'brand',
|
||||
model: 'model',
|
||||
device: 'device',
|
||||
os_version: 'os_version',
|
||||
sdk_version: 'sdk_version',
|
||||
release_number: 'release_number',
|
||||
browser_name: 'browser_name',
|
||||
fcm_token: 'fcm_token'
|
||||
} as const
|
||||
|
||||
export type UserDevicesOrderByRelevanceFieldEnum = (typeof UserDevicesOrderByRelevanceFieldEnum)[keyof typeof UserDevicesOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
complex_id: 'complex_id'
|
||||
@@ -321,25 +644,6 @@ export const CustomerLegalOrderByRelevanceFieldEnum = {
|
||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const DeviceOrderByRelevanceFieldEnum = {
|
||||
account_id: 'account_id',
|
||||
app_version: 'app_version',
|
||||
build_number: 'build_number',
|
||||
uuid: 'uuid',
|
||||
platform: 'platform',
|
||||
brand: 'brand',
|
||||
model: 'model',
|
||||
device: 'device',
|
||||
os_version: 'os_version',
|
||||
sdk_version: 'sdk_version',
|
||||
release_number: 'release_number',
|
||||
browser_name: 'browser_name',
|
||||
fcm_token: 'fcm_token'
|
||||
} as const
|
||||
|
||||
export type DeviceOrderByRelevanceFieldEnum = (typeof DeviceOrderByRelevanceFieldEnum)[keyof typeof DeviceOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GoodOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -347,9 +651,9 @@ export const GoodOrderByRelevanceFieldEnum = {
|
||||
sku: 'sku',
|
||||
local_sku: 'local_sku',
|
||||
barcode: 'barcode',
|
||||
complex_id: 'complex_id',
|
||||
category_id: 'category_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
guild_id: 'guild_id'
|
||||
} as const
|
||||
|
||||
export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum]
|
||||
@@ -360,21 +664,13 @@ export const GoodCategoryOrderByRelevanceFieldEnum = {
|
||||
name: 'name',
|
||||
description: 'description',
|
||||
image_url: 'image_url',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
complex_id: 'complex_id',
|
||||
guild_id: 'guild_id'
|
||||
} as const
|
||||
|
||||
export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||
message: 'message',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: 'DbNull',
|
||||
JsonNull: 'JsonNull',
|
||||
|
||||
@@ -8,13 +8,26 @@
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
export type * from './models/Token.js'
|
||||
export type * from './models/VerificationCode.js'
|
||||
export type * from './models/Guild.js'
|
||||
export type * from './models/BusinessActivity.js'
|
||||
export type * from './models/Complex.js'
|
||||
export type * from './models/Pos.js'
|
||||
export type * from './models/DeviceBrand.js'
|
||||
export type * from './models/Device.js'
|
||||
export type * from './models/License.js'
|
||||
export type * from './models/Partner.js'
|
||||
export type * from './models/User.js'
|
||||
export type * from './models/Account.js'
|
||||
export type * from './models/Provider.js'
|
||||
export type * from './models/TriggerLog.js'
|
||||
export type * from './models/UserDevices.js'
|
||||
export type * from './models/Customer.js'
|
||||
export type * from './models/CustomerIndividual.js'
|
||||
export type * from './models/CustomerLegal.js'
|
||||
export type * from './models/Device.js'
|
||||
export type * from './models/Good.js'
|
||||
export type * from './models/GoodCategory.js'
|
||||
export type * from './models/TriggerLog.js'
|
||||
export type * from './models/SalesInvoice.js'
|
||||
export type * from './models/SalesInvoiceItem.js'
|
||||
export type * from './models/SalesInvoicePayment.js'
|
||||
|
||||
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
@@ -387,14 +387,6 @@ export type CustomerNullableScalarRelationFilter = {
|
||||
isNot?: Prisma.CustomerWhereInput | null
|
||||
}
|
||||
|
||||
export type StringFieldUpdateOperationsInput = {
|
||||
set?: string
|
||||
}
|
||||
|
||||
export type DateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string
|
||||
}
|
||||
|
||||
export type NullableDateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string | null
|
||||
}
|
||||
|
||||
@@ -401,10 +401,6 @@ export type CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerIndividualUpdateWithoutCustomerInput>, Prisma.CustomerIndividualUncheckedUpdateWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type NullableStringFieldUpdateOperationsInput = {
|
||||
set?: string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutCustomerInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
|
||||
@@ -206,17 +206,17 @@ export type CustomerLegalOrderByWithRelationInput = {
|
||||
|
||||
export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||
customer_id?: string
|
||||
registration_number?: string
|
||||
complex_id_registration_number?: Prisma.CustomerLegalComplex_idRegistration_numberCompoundUniqueInput
|
||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
OR?: Prisma.CustomerLegalWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
}, "customer_id" | "registration_number" | "complex_id_registration_number">
|
||||
}, "customer_id" | "complex_id_registration_number">
|
||||
|
||||
export type CustomerLegalOrderByWithAggregationInput = {
|
||||
customer_id?: Prisma.SortOrder
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+563
-140
File diff suppressed because it is too large
Load Diff
@@ -29,8 +29,9 @@ export type GoodCategoryMinAggregateOutputType = {
|
||||
name: string | null
|
||||
description: string | null
|
||||
image_url: string | null
|
||||
account_id: string | null
|
||||
complex_id: string | null
|
||||
is_default_guild_good: boolean | null
|
||||
guild_id: string | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
@@ -41,8 +42,9 @@ export type GoodCategoryMaxAggregateOutputType = {
|
||||
name: string | null
|
||||
description: string | null
|
||||
image_url: string | null
|
||||
account_id: string | null
|
||||
complex_id: string | null
|
||||
is_default_guild_good: boolean | null
|
||||
guild_id: string | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
@@ -53,8 +55,9 @@ export type GoodCategoryCountAggregateOutputType = {
|
||||
name: number
|
||||
description: number
|
||||
image_url: number
|
||||
account_id: number
|
||||
complex_id: number
|
||||
is_default_guild_good: number
|
||||
guild_id: number
|
||||
created_at: number
|
||||
updated_at: number
|
||||
deleted_at: number
|
||||
@@ -67,8 +70,9 @@ export type GoodCategoryMinAggregateInputType = {
|
||||
name?: true
|
||||
description?: true
|
||||
image_url?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
is_default_guild_good?: true
|
||||
guild_id?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
@@ -79,8 +83,9 @@ export type GoodCategoryMaxAggregateInputType = {
|
||||
name?: true
|
||||
description?: true
|
||||
image_url?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
is_default_guild_good?: true
|
||||
guild_id?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
@@ -91,8 +96,9 @@ export type GoodCategoryCountAggregateInputType = {
|
||||
name?: true
|
||||
description?: true
|
||||
image_url?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
is_default_guild_good?: true
|
||||
guild_id?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
@@ -176,8 +182,9 @@ export type GoodCategoryGroupByOutputType = {
|
||||
name: string
|
||||
description: string | null
|
||||
image_url: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
complex_id: string | null
|
||||
is_default_guild_good: boolean
|
||||
guild_id: string | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
@@ -209,12 +216,15 @@ export type GoodCategoryWhereInput = {
|
||||
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
account_id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||
}
|
||||
|
||||
export type GoodCategoryOrderByWithRelationInput = {
|
||||
@@ -222,12 +232,15 @@ export type GoodCategoryOrderByWithRelationInput = {
|
||||
name?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
is_default_guild_good?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
_relevance?: Prisma.GoodCategoryOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -239,12 +252,15 @@ export type GoodCategoryWhereUniqueInput = Prisma.AtLeast<{
|
||||
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
account_id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
export type GoodCategoryOrderByWithAggregationInput = {
|
||||
@@ -252,8 +268,9 @@ export type GoodCategoryOrderByWithAggregationInput = {
|
||||
name?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
is_default_guild_good?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
@@ -270,8 +287,9 @@ export type GoodCategoryScalarWhereWithAggregatesInput = {
|
||||
name?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
||||
description?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||
image_url?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||
account_id?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
||||
complex_id?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||
is_default_guild_good?: Prisma.BoolWithAggregatesFilter<"GoodCategory"> | boolean
|
||||
guild_id?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableWithAggregatesFilter<"GoodCategory"> | Date | string | null
|
||||
@@ -282,12 +300,13 @@ export type GoodCategoryCreateInput = {
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateInput = {
|
||||
@@ -295,8 +314,9 @@ export type GoodCategoryUncheckedCreateInput = {
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
complex_id?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
@@ -308,12 +328,13 @@ export type GoodCategoryUpdateInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateInput = {
|
||||
@@ -321,8 +342,9 @@ export type GoodCategoryUncheckedUpdateInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
@@ -334,8 +356,9 @@ export type GoodCategoryCreateManyInput = {
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
complex_id?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
@@ -346,8 +369,7 @@ export type GoodCategoryUpdateManyMutationInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
@@ -358,13 +380,24 @@ export type GoodCategoryUncheckedUpdateManyInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryListRelationFilter = {
|
||||
every?: Prisma.GoodCategoryWhereInput
|
||||
some?: Prisma.GoodCategoryWhereInput
|
||||
none?: Prisma.GoodCategoryWhereInput
|
||||
}
|
||||
|
||||
export type GoodCategoryOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type GoodCategoryNullableScalarRelationFilter = {
|
||||
is?: Prisma.GoodCategoryWhereInput | null
|
||||
isNot?: Prisma.GoodCategoryWhereInput | null
|
||||
@@ -381,8 +414,9 @@ export type GoodCategoryCountOrderByAggregateInput = {
|
||||
name?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
image_url?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_default_guild_good?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
@@ -393,8 +427,9 @@ export type GoodCategoryMaxOrderByAggregateInput = {
|
||||
name?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
image_url?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_default_guild_good?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
@@ -405,13 +440,98 @@ export type GoodCategoryMinOrderByAggregateInput = {
|
||||
name?: Prisma.SortOrder
|
||||
description?: Prisma.SortOrder
|
||||
image_url?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_default_guild_good?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateNestedManyWithoutGuildInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateNestedManyWithoutGuildInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateManyWithoutGuildNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput[]
|
||||
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput[]
|
||||
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateManyWithoutGuildNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput[]
|
||||
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput[]
|
||||
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateNestedOneWithoutGoodsInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGoodsInput, Prisma.GoodCategoryUncheckedCreateWithoutGoodsInput>
|
||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGoodsInput
|
||||
@@ -428,16 +548,137 @@ export type GoodCategoryUpdateOneWithoutGoodsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodCategoryUpdateToOneWithWhereWithoutGoodsInput, Prisma.GoodCategoryUpdateWithoutGoodsInput>, Prisma.GoodCategoryUncheckedUpdateWithoutGoodsInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateWithoutGuildInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutGuildInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
complex_id?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutCategoryInput
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateOrConnectWithoutGuildInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateManyGuildInputEnvelope = {
|
||||
data: Prisma.GoodCategoryCreateManyGuildInput | Prisma.GoodCategoryCreateManyGuildInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type GoodCategoryUpsertWithWhereUniqueWithoutGuildInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutGuildInput, Prisma.GoodCategoryUncheckedUpdateWithoutGuildInput>
|
||||
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateWithWhereUniqueWithoutGuildInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutGuildInput, Prisma.GoodCategoryUncheckedUpdateWithoutGuildInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateManyWithWhereWithoutGuildInput = {
|
||||
where: Prisma.GoodCategoryScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.GoodCategoryUpdateManyMutationInput, Prisma.GoodCategoryUncheckedUpdateManyWithoutGuildInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryScalarWhereInput = {
|
||||
AND?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
OR?: Prisma.GoodCategoryScalarWhereInput[]
|
||||
NOT?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateWithoutComplexInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutComplexInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutCategoryInput
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateOrConnectWithoutComplexInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateManyComplexInputEnvelope = {
|
||||
data: Prisma.GoodCategoryCreateManyComplexInput | Prisma.GoodCategoryCreateManyComplexInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type GoodCategoryUpsertWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutComplexInput, Prisma.GoodCategoryUncheckedUpdateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.GoodCategoryWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutComplexInput, Prisma.GoodCategoryUncheckedUpdateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateManyWithWhereWithoutComplexInput = {
|
||||
where: Prisma.GoodCategoryScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.GoodCategoryUpdateManyMutationInput, Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateWithoutGoodsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
||||
@@ -445,8 +686,9 @@ export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
complex_id?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
@@ -473,11 +715,12 @@ export type GoodCategoryUpdateWithoutGoodsInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
||||
@@ -485,8 +728,109 @@ export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateManyGuildInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
complex_id?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateWithoutGuildInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutGuildInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutCategoryNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateManyWithoutGuildInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryCreateManyComplexInput = {
|
||||
id?: string
|
||||
name: string
|
||||
description?: string | null
|
||||
image_url?: string | null
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
}
|
||||
|
||||
export type GoodCategoryUpdateWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutCategoryNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateManyWithoutComplexInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
@@ -528,12 +872,15 @@ export type GoodCategorySelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
name?: boolean
|
||||
description?: boolean
|
||||
image_url?: boolean
|
||||
account_id?: boolean
|
||||
complex_id?: boolean
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["goodCategory"]>
|
||||
|
||||
@@ -544,16 +891,19 @@ export type GoodCategorySelectScalar = {
|
||||
name?: boolean
|
||||
description?: boolean
|
||||
image_url?: boolean
|
||||
account_id?: boolean
|
||||
complex_id?: boolean
|
||||
is_default_guild_good?: boolean
|
||||
guild_id?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
}
|
||||
|
||||
export type GoodCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "image_url" | "account_id" | "complex_id" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["goodCategory"]>
|
||||
export type GoodCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "image_url" | "complex_id" | "is_default_guild_good" | "guild_id" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["goodCategory"]>
|
||||
export type GoodCategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -561,14 +911,17 @@ export type $GoodCategoryPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
name: "GoodCategory"
|
||||
objects: {
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
guild: Prisma.$GuildPayload<ExtArgs> | null
|
||||
complex: Prisma.$ComplexPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
name: string
|
||||
description: string | null
|
||||
image_url: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
complex_id: string | null
|
||||
is_default_guild_good: boolean
|
||||
guild_id: string | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
@@ -913,6 +1266,8 @@ readonly fields: GoodCategoryFieldRefs;
|
||||
export interface Prisma__GoodCategoryClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
goods<T extends Prisma.GoodCategory$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
guild<T extends Prisma.GoodCategory$guildArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$guildArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.GoodCategory$complexArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$complexArgs<ExtArgs>>): Prisma.Prisma__ComplexClient<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -946,8 +1301,9 @@ export interface GoodCategoryFieldRefs {
|
||||
readonly name: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly description: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly image_url: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly account_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly complex_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly is_default_guild_good: Prisma.FieldRef<"GoodCategory", 'Boolean'>
|
||||
readonly guild_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||
readonly created_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||
readonly updated_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||
readonly deleted_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||
@@ -1317,6 +1673,44 @@ export type GoodCategory$goodsArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.guild
|
||||
*/
|
||||
export type GoodCategory$guildArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Guild
|
||||
*/
|
||||
select?: Prisma.GuildSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Guild
|
||||
*/
|
||||
omit?: Prisma.GuildOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GuildInclude<ExtArgs> | null
|
||||
where?: Prisma.GuildWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.complex
|
||||
*/
|
||||
export type GoodCategory$complexArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Complex
|
||||
*/
|
||||
select?: Prisma.ComplexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Complex
|
||||
*/
|
||||
omit?: Prisma.ComplexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ComplexInclude<ExtArgs> | null
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory without action
|
||||
*/
|
||||
|
||||
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
File diff suppressed because it is too large
Load Diff
@@ -555,6 +555,14 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type DecimalFieldUpdateOperationsInput = {
|
||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateNestedOneWithoutItemsInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
|
||||
|
||||
@@ -49,7 +49,6 @@ export type SalesInvoiceItemMinAggregateOutputType = {
|
||||
created_at: Date | null
|
||||
discount: runtime.Decimal | null
|
||||
notes: string | null
|
||||
pricingModel: $Enums.SalesInvoiceItemPricingModel | null
|
||||
invoice_id: string | null
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
@@ -64,7 +63,6 @@ export type SalesInvoiceItemMaxAggregateOutputType = {
|
||||
created_at: Date | null
|
||||
discount: runtime.Decimal | null
|
||||
notes: string | null
|
||||
pricingModel: $Enums.SalesInvoiceItemPricingModel | null
|
||||
invoice_id: string | null
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
@@ -79,7 +77,6 @@ export type SalesInvoiceItemCountAggregateOutputType = {
|
||||
created_at: number
|
||||
discount: number
|
||||
notes: number
|
||||
pricingModel: number
|
||||
invoice_id: number
|
||||
good_id: number
|
||||
service_id: number
|
||||
@@ -111,7 +108,6 @@ export type SalesInvoiceItemMinAggregateInputType = {
|
||||
created_at?: true
|
||||
discount?: true
|
||||
notes?: true
|
||||
pricingModel?: true
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
@@ -126,7 +122,6 @@ export type SalesInvoiceItemMaxAggregateInputType = {
|
||||
created_at?: true
|
||||
discount?: true
|
||||
notes?: true
|
||||
pricingModel?: true
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
@@ -141,7 +136,6 @@ export type SalesInvoiceItemCountAggregateInputType = {
|
||||
created_at?: true
|
||||
discount?: true
|
||||
notes?: true
|
||||
pricingModel?: true
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
@@ -244,7 +238,6 @@ export type SalesInvoiceItemGroupByOutputType = {
|
||||
created_at: Date
|
||||
discount: runtime.Decimal
|
||||
notes: string | null
|
||||
pricingModel: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
@@ -283,7 +276,6 @@ export type SalesInvoiceItemWhereInput = {
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
@@ -302,7 +294,6 @@ export type SalesInvoiceItemOrderByWithRelationInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
pricingModel?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
@@ -325,7 +316,6 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
@@ -344,7 +334,6 @@ export type SalesInvoiceItemOrderByWithAggregationInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
pricingModel?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
@@ -368,7 +357,6 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
||||
discount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelWithAggregatesFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||
@@ -384,7 +372,6 @@ export type SalesInvoiceItemCreateInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
@@ -400,7 +387,6 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id?: string | null
|
||||
service_id?: string | null
|
||||
@@ -416,7 +402,6 @@ export type SalesInvoiceItemUpdateInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
@@ -432,7 +417,6 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -448,7 +432,6 @@ export type SalesInvoiceItemCreateManyInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id?: string | null
|
||||
service_id?: string | null
|
||||
@@ -464,7 +447,6 @@ export type SalesInvoiceItemUpdateManyMutationInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
@@ -477,7 +459,6 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -509,7 +490,6 @@ export type SalesInvoiceItemCountOrderByAggregateInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
notes?: Prisma.SortOrder
|
||||
pricingModel?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
@@ -532,7 +512,6 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
notes?: Prisma.SortOrder
|
||||
pricingModel?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
@@ -547,7 +526,6 @@ export type SalesInvoiceItemMinOrderByAggregateInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
notes?: Prisma.SortOrder
|
||||
pricingModel?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
@@ -648,10 +626,6 @@ export type EnumUnitTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.UnitType
|
||||
}
|
||||
|
||||
export type EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput = {
|
||||
set?: $Enums.SalesInvoiceItemPricingModel
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateNestedManyWithoutServiceInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||
@@ -703,7 +677,6 @@ export type SalesInvoiceItemCreateWithoutGoodInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
@@ -718,7 +691,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
service_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -762,7 +734,6 @@ export type SalesInvoiceItemScalarWhereInput = {
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
@@ -778,7 +749,6 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
@@ -793,7 +763,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
good_id?: string | null
|
||||
service_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -834,7 +803,6 @@ export type SalesInvoiceItemCreateWithoutServiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
@@ -849,7 +817,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -890,7 +857,6 @@ export type SalesInvoiceItemCreateManyGoodInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
service_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -905,7 +871,6 @@ export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
@@ -920,7 +885,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -935,7 +899,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -950,7 +913,6 @@ export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
good_id?: string | null
|
||||
service_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -965,7 +927,6 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
@@ -980,7 +941,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -995,7 +955,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -1010,7 +969,6 @@ export type SalesInvoiceItemCreateManyServiceInput = {
|
||||
created_at?: Date | string
|
||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -1025,7 +983,6 @@ export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
@@ -1040,7 +997,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -1055,7 +1011,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
@@ -1072,7 +1027,6 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
created_at?: boolean
|
||||
discount?: boolean
|
||||
notes?: boolean
|
||||
pricingModel?: boolean
|
||||
invoice_id?: boolean
|
||||
good_id?: boolean
|
||||
service_id?: boolean
|
||||
@@ -1093,14 +1047,13 @@ export type SalesInvoiceItemSelectScalar = {
|
||||
created_at?: boolean
|
||||
discount?: boolean
|
||||
notes?: boolean
|
||||
pricingModel?: boolean
|
||||
invoice_id?: boolean
|
||||
good_id?: boolean
|
||||
service_id?: boolean
|
||||
payload?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "unit_type" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "pricingModel" | "invoice_id" | "good_id" | "service_id" | "payload", ExtArgs["result"]["salesInvoiceItem"]>
|
||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "unit_type" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "invoice_id" | "good_id" | "service_id" | "payload", ExtArgs["result"]["salesInvoiceItem"]>
|
||||
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
||||
@@ -1123,7 +1076,6 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
||||
created_at: Date
|
||||
discount: runtime.Decimal
|
||||
notes: string | null
|
||||
pricingModel: $Enums.SalesInvoiceItemPricingModel
|
||||
invoice_id: string
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
@@ -1508,7 +1460,6 @@ export interface SalesInvoiceItemFieldRefs {
|
||||
readonly created_at: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
||||
readonly discount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||
readonly notes: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly pricingModel: Prisma.FieldRef<"SalesInvoiceItem", 'SalesInvoiceItemPricingModel'>
|
||||
readonly invoice_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly good_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly service_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
|
||||
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
+1
-1
@@ -5,9 +5,9 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
||||
import { AppModule } from './app.module'
|
||||
import { PrismaExceptionFilter } from './common/filters/prisma-exception.filter'
|
||||
import { ValidationExceptionFilter } from './common/filters/validation-exception.filter'
|
||||
import { JwtAuthGuard } from './common/guards/jwt-auth.guard'
|
||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||
import { ResponseMappingInterceptor } from './common/interceptors/response-mapping.interceptor'
|
||||
import { JwtAuthGuard } from './modules/auth/jwt-auth.guard'
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Controller } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
|
||||
@ApiTags('Admin')
|
||||
@Controller('admin')
|
||||
export class AdminController {}
|
||||
@@ -0,0 +1,14 @@
|
||||
// import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'
|
||||
// import { Observable } from 'rxjs'
|
||||
|
||||
// @Injectable()
|
||||
// export class AdminGuard implements CanActivate {
|
||||
// canActivate(
|
||||
// _context: ExecutionContext,
|
||||
// ): boolean | Promise<boolean> | Observable<boolean> {
|
||||
// // Replace with real auth/permission checks (e.g., check JWT claims)
|
||||
// const request = _context.switchToHttp().getRequest()
|
||||
// const isAdminHeader = request.headers['x-admin']
|
||||
// return isAdminHeader === 'true' || request.isAdminRequest === true
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common'
|
||||
import { NextFunction, Request, Response } from 'express'
|
||||
|
||||
@Injectable()
|
||||
export class AdminMiddleware implements NestMiddleware {
|
||||
use(req: Request, _res: Response, next: NextFunction) {
|
||||
console.log('first')
|
||||
// @ts-ignore
|
||||
console.log(req.dataPayload)
|
||||
// const a = reqTokenPayload()
|
||||
// console.log(a)
|
||||
|
||||
// Middleware-based admin check (replace with real auth logic)
|
||||
const isAdminHeader = req.headers['x-admin']
|
||||
|
||||
if (isAdminHeader === 'true') {
|
||||
// mark request if needed downstream
|
||||
req['isAdminRequest'] = true
|
||||
}
|
||||
return next()
|
||||
|
||||
throw new UnauthorizedException('Admin access required')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from '@nestjs/common'
|
||||
import { AdminController } from './admin.controller'
|
||||
import { AdminMiddleware } from './admin.middleware'
|
||||
import { AdminDeviceBrandsModule } from './device-brands/device-brands.module'
|
||||
import { AdminDevicesModule } from './devices/devices.module'
|
||||
import { AdminGuildsModule } from './guilds/guilds.module'
|
||||
import { AdminLicensesModule } from './licenses/licenses.module'
|
||||
import { AdminPartnersModule } from './partners/partners.module'
|
||||
import { AdminProvidersModule } from './providers/providers.module'
|
||||
import { AdminTranslateModule } from './translate/translate.module'
|
||||
import { AdminUserAccountsModule } from './users/accounts/accounts.module'
|
||||
import { AdminUsersModule } from './users/users.module'
|
||||
|
||||
@Module({
|
||||
controllers: [AdminController],
|
||||
imports: [
|
||||
AdminUsersModule,
|
||||
AdminUserAccountsModule,
|
||||
AdminTranslateModule,
|
||||
AdminProvidersModule,
|
||||
AdminPartnersModule,
|
||||
AdminPartnersModule,
|
||||
AdminGuildsModule,
|
||||
AdminDeviceBrandsModule,
|
||||
AdminDevicesModule,
|
||||
AdminLicensesModule,
|
||||
],
|
||||
})
|
||||
export class AdminModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
// apply middleware to all routes within this module (scoped under /admin)
|
||||
consumer.apply(AdminMiddleware).forRoutes({
|
||||
path: '/admin*path',
|
||||
method: RequestMethod.ALL,
|
||||
version: '1',
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { DeviceBrandsService } from './device-brands.service'
|
||||
import { CreateDeviceBrandDto } from './dto/create-device-brand.dto'
|
||||
import { UpdateDeviceBrandDto } from './dto/update-device-brand.dto'
|
||||
|
||||
@Controller('admin/device_brands')
|
||||
export class DeviceBrandsController {
|
||||
constructor(private readonly deviceBrandsService: DeviceBrandsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.deviceBrandsService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.deviceBrandsService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateDeviceBrandDto) {
|
||||
return this.deviceBrandsService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateDeviceBrandDto) {
|
||||
return this.deviceBrandsService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.deviceBrandsService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { DeviceBrandsController } from './device-brands.controller'
|
||||
import { DeviceBrandsService } from './device-brands.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [DeviceBrandsController],
|
||||
providers: [DeviceBrandsService],
|
||||
})
|
||||
export class AdminDeviceBrandsModule {}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
|
||||
@Injectable()
|
||||
export class DeviceBrandsService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll() {
|
||||
const brands = await this.prisma.deviceBrand.findMany()
|
||||
return ResponseMapper.list(brands)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const brand = await this.prisma.deviceBrand.findUnique({
|
||||
where: { id },
|
||||
})
|
||||
return ResponseMapper.single(brand)
|
||||
}
|
||||
|
||||
async create(data: any) {
|
||||
const device = await this.prisma.deviceBrand.create({ data })
|
||||
return ResponseMapper.create(device)
|
||||
}
|
||||
|
||||
async update(id: string, data: any) {
|
||||
const device = await this.prisma.deviceBrand.update({ where: { id }, data })
|
||||
return ResponseMapper.update(device)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.deviceBrand.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { IsString } from 'class-validator'
|
||||
|
||||
export class CreateDeviceBrandDto {
|
||||
@IsString()
|
||||
name: string
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/swagger'
|
||||
import { CreateDeviceBrandDto } from './create-device-brand.dto'
|
||||
|
||||
export class UpdateDeviceBrandDto extends PartialType(CreateDeviceBrandDto) {}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { DevicesService } from './devices.service'
|
||||
import { CreateDeviceDto, UpdateDeviceDto } from './dto/device.dto'
|
||||
|
||||
@Controller('admin/devices')
|
||||
export class DevicesController {
|
||||
constructor(private readonly devicesService: DevicesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.devicesService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.devicesService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateDeviceDto) {
|
||||
return this.devicesService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateDeviceDto) {
|
||||
return this.devicesService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.devicesService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { DevicesController } from './devices.controller'
|
||||
import { DevicesService } from './devices.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [DevicesController],
|
||||
providers: [DevicesService],
|
||||
})
|
||||
export class AdminDevicesModule {}
|
||||
@@ -0,0 +1,52 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateDeviceDto, UpdateDeviceDto } from './dto/device.dto'
|
||||
|
||||
@Injectable()
|
||||
export class DevicesService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll(page = 1, pageSize = 10) {
|
||||
const [items, count] = await this.prisma.$transaction([
|
||||
this.prisma.device.findMany({
|
||||
skip: (page - 1) * pageSize,
|
||||
take: pageSize,
|
||||
include: { brand: true },
|
||||
}),
|
||||
this.prisma.device.count(),
|
||||
])
|
||||
return ResponseMapper.paginate(items, { count, page, pageSize })
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const item = await this.prisma.device.findUnique({
|
||||
where: { id },
|
||||
include: { brand: true },
|
||||
})
|
||||
return ResponseMapper.single(item)
|
||||
}
|
||||
|
||||
async create(data: CreateDeviceDto) {
|
||||
const { brand_id, ...rest } = data
|
||||
|
||||
const dataToCreate = {
|
||||
...rest,
|
||||
brand: { connect: { id: brand_id } },
|
||||
}
|
||||
const device = await this.prisma.device.create({
|
||||
data: dataToCreate,
|
||||
})
|
||||
return ResponseMapper.create(device)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateDeviceDto) {
|
||||
const device = await this.prisma.device.update({ where: { id }, data })
|
||||
return ResponseMapper.update(device)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.device.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateDeviceDto {
|
||||
@IsString()
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
os_version?: string
|
||||
|
||||
@IsString()
|
||||
brand_id: string
|
||||
}
|
||||
|
||||
export class UpdateDeviceDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
name?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
os_version?: string
|
||||
|
||||
@IsOptional()
|
||||
brand_id?: string
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateGuildDto {
|
||||
@IsString()
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
code?: string
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/swagger'
|
||||
import { CreateGuildDto } from './create-guild.dto'
|
||||
|
||||
export class UpdateGuildDto extends PartialType(CreateGuildDto) {}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import {
|
||||
CreateGoodCategoryDto,
|
||||
UpdateGoodCategoryDto,
|
||||
} from './dto/create-good-category.dto'
|
||||
import { GoodCategoriesService } from './good-categories.service'
|
||||
|
||||
@Controller('admin/guilds/:guildId/good_categories')
|
||||
export class GoodCategoriesController {
|
||||
constructor(private readonly goodCategoriesService: GoodCategoriesService) {}
|
||||
|
||||
@Get()
|
||||
findAll(@Param('guildId') guildId: string) {
|
||||
return this.goodCategoriesService.findAll(guildId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('guildId') guildId: string, @Param('id') id: string) {
|
||||
return this.goodCategoriesService.findOne(guildId, id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Param('guildId') guildId: string, @Body() data: CreateGoodCategoryDto) {
|
||||
return this.goodCategoriesService.create(guildId, data)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(
|
||||
@Param('guildId') guildId: string,
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateGoodCategoryDto,
|
||||
) {
|
||||
return this.goodCategoriesService.update(guildId, id, data)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { GoodCategoriesController } from './good-categories.controller'
|
||||
import { GoodCategoriesService } from './good-categories.service'
|
||||
|
||||
@Module({
|
||||
controllers: [GoodCategoriesController],
|
||||
providers: [GoodCategoriesService],
|
||||
})
|
||||
export class GuildGoodCategoriesModule {}
|
||||
@@ -0,0 +1,121 @@
|
||||
import { GoodCategoryOmit } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import {
|
||||
CreateGoodCategoryDto,
|
||||
UpdateGoodCategoryDto,
|
||||
} from './dto/create-good-category.dto'
|
||||
|
||||
@Injectable()
|
||||
export class GoodCategoriesService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
private readonly goodCategoriesOmit = {
|
||||
complex_id: true,
|
||||
guild_id: true,
|
||||
is_default_guild_good: true,
|
||||
} as GoodCategoryOmit
|
||||
|
||||
async findAll(guild_id: string) {
|
||||
const categories = await this.prisma.goodCategory.findMany({
|
||||
where: {
|
||||
guild_id,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
include: {
|
||||
_count: {
|
||||
select: {
|
||||
goods: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: this.goodCategoriesOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.list(
|
||||
categories.map(category => {
|
||||
const { _count, ...rest } = category
|
||||
return {
|
||||
...rest,
|
||||
goods_count: Number(_count.goods),
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
async findOne(guild_id: string, categoryId: string) {
|
||||
const category = await this.prisma.goodCategory.findUnique({
|
||||
where: {
|
||||
guild_id,
|
||||
id: categoryId,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
include: {
|
||||
_count: {
|
||||
select: {
|
||||
goods: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: this.goodCategoriesOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.single({
|
||||
...category,
|
||||
goods_count: Number(category?._count.goods),
|
||||
})
|
||||
}
|
||||
|
||||
create(guild_id: string, data: CreateGoodCategoryDto) {
|
||||
const category = this.prisma.goodCategory.create({
|
||||
data: {
|
||||
guild: {
|
||||
connect: {
|
||||
id: guild_id,
|
||||
},
|
||||
},
|
||||
name: data.name,
|
||||
image_url: data.image_url,
|
||||
description: data.description,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
omit: this.goodCategoriesOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.create({ ...category, goods_count: 0 })
|
||||
}
|
||||
|
||||
async update(guild_id: string, id: string, data: UpdateGoodCategoryDto) {
|
||||
const category = await this.prisma.goodCategory.update({
|
||||
where: {
|
||||
guild_id,
|
||||
id,
|
||||
},
|
||||
data: {
|
||||
guild: {
|
||||
connect: {
|
||||
id: guild_id,
|
||||
},
|
||||
},
|
||||
name: data.name,
|
||||
image_url: data.image_url,
|
||||
description: data.description,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
include: {
|
||||
_count: {
|
||||
select: {
|
||||
goods: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: this.goodCategoriesOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.update({
|
||||
...category,
|
||||
goods_count: Number(category?._count.goods),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateGoodDto {
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
name: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
sku: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
category_id: string
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: false })
|
||||
local_sku?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
barcode?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
description?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: false })
|
||||
base_sale_price?: number
|
||||
}
|
||||
|
||||
export class UpdateGoodDto extends PartialType(CreateGoodDto) {}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { CreateGoodDto } from './dto/create-good.dto'
|
||||
import { GoodsService } from './goods.service'
|
||||
|
||||
@Controller('admin/guilds/:guildId/goods')
|
||||
export class GoodsController {
|
||||
constructor(private readonly goodsService: GoodsService) {}
|
||||
|
||||
@Get()
|
||||
findAll(@Param('guildId') guildId: string) {
|
||||
return this.goodsService.findAll(guildId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('guildId') guildId: string, @Param('id') goodId: string) {
|
||||
return this.goodsService.findOne(guildId, goodId)
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Param('guildId') guildId: string, @Body() data: CreateGoodDto) {
|
||||
return this.goodsService.create(guildId, data)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { GoodsController } from './goods.controller'
|
||||
import { GoodsService } from './goods.service'
|
||||
|
||||
@Module({
|
||||
controllers: [GoodsController],
|
||||
providers: [GoodsService],
|
||||
})
|
||||
export class GuildGoodsModule {}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { GoodOmit } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateGoodDto } from './dto/create-good.dto'
|
||||
|
||||
@Injectable()
|
||||
export class GoodsService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
private readonly goodOmit = {
|
||||
complex_id: true,
|
||||
barcode: true,
|
||||
base_sale_price: true,
|
||||
is_default_guild_good: true,
|
||||
local_sku: true,
|
||||
guild_id: true,
|
||||
} as GoodOmit
|
||||
|
||||
async findAll(guildId: string) {
|
||||
const [goods, count] = await this.prisma.$transaction([
|
||||
this.prisma.good.findMany({
|
||||
where: {
|
||||
guild_id: guildId,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
omit: this.goodOmit,
|
||||
}),
|
||||
this.prisma.good.count(),
|
||||
])
|
||||
return ResponseMapper.paginate(goods, {
|
||||
count,
|
||||
})
|
||||
}
|
||||
|
||||
async findOne(guild_id: string, id: string) {
|
||||
const good = await this.prisma.good.findUnique({
|
||||
where: {
|
||||
guild_id,
|
||||
id,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
|
||||
omit: this.goodOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.single(good)
|
||||
}
|
||||
|
||||
async create(guild_id: string, data: CreateGoodDto) {
|
||||
const { category_id, ...rest } = data
|
||||
|
||||
const good = await this.prisma.good.create({
|
||||
data: {
|
||||
guild: {
|
||||
connect: {
|
||||
id: guild_id,
|
||||
},
|
||||
},
|
||||
category: {
|
||||
connect: {
|
||||
id: category_id,
|
||||
},
|
||||
},
|
||||
...rest,
|
||||
is_default_guild_good: true,
|
||||
},
|
||||
omit: this.goodOmit,
|
||||
})
|
||||
|
||||
return ResponseMapper.create(good)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Body, Controller, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { CreateGuildDto } from './dto/create-guild.dto'
|
||||
import { UpdateGuildDto } from './dto/update-guild.dto'
|
||||
import { GuildsService } from './guilds.service'
|
||||
|
||||
@ApiTags('guilds')
|
||||
@Controller('admin/guilds')
|
||||
export class GuildsController {
|
||||
constructor(private readonly guildsService: GuildsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.guildsService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.guildsService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateGuildDto) {
|
||||
return await this.guildsService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateGuildDto) {
|
||||
return await this.guildsService.update(id, data)
|
||||
}
|
||||
|
||||
// @Delete(':id')
|
||||
// async delete(@Param('id') id: string) {
|
||||
// await this.guildsService.delete(id)
|
||||
// return ResponseMapper.delete()
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { GuildGoodCategoriesModule } from './good-categories/good-categories.module'
|
||||
import { GuildGoodsModule } from './goods/goods.module'
|
||||
import { GuildsController } from './guilds.controller'
|
||||
import { GuildsService } from './guilds.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule, GuildGoodsModule, GuildGoodCategoriesModule],
|
||||
providers: [GuildsService],
|
||||
controllers: [GuildsController],
|
||||
})
|
||||
export class AdminGuildsModule {}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { ResponseMapper } from '@/common/response/response-mapper'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { CreateGuildDto } from './dto/create-guild.dto'
|
||||
import { UpdateGuildDto } from './dto/update-guild.dto'
|
||||
|
||||
@Injectable()
|
||||
export class GuildsService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async findAll() {
|
||||
const [guilds, count] = await this.prisma.$transaction([
|
||||
this.prisma.guild.findMany({
|
||||
include: {
|
||||
_count: {
|
||||
select: {
|
||||
business_activities: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
this.prisma.guild.count(),
|
||||
])
|
||||
|
||||
return ResponseMapper.paginate(
|
||||
guilds.map(guild => {
|
||||
const { _count, ...rest } = guild
|
||||
return {
|
||||
...rest,
|
||||
businessActivitiesCount: guild._count.business_activities,
|
||||
}
|
||||
}),
|
||||
{ count },
|
||||
)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const guild = await this.prisma.guild.findUnique({
|
||||
where: { id },
|
||||
include: {
|
||||
business_activities: {
|
||||
omit: {
|
||||
guild_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
return ResponseMapper.single(guild)
|
||||
}
|
||||
|
||||
async create(data: CreateGuildDto) {
|
||||
const guild = await this.prisma.guild.create({ data })
|
||||
return ResponseMapper.create(guild)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateGuildDto) {
|
||||
const guild = await this.prisma.guild.update({ where: { id }, data })
|
||||
return ResponseMapper.update(guild)
|
||||
}
|
||||
|
||||
// async delete(id: string) {
|
||||
// await this.prisma.guild.delete({ where: { id } })
|
||||
// return ResponseMapper.
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { LicenseStatus } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateLicenseDto {
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
account_id: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
pos_id: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
partner_id: string
|
||||
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: false })
|
||||
starts_at: string
|
||||
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: false })
|
||||
expires_at: string
|
||||
}
|
||||
|
||||
export class UpdateLicenseDto {
|
||||
@IsString()
|
||||
pos_id?: string
|
||||
|
||||
@IsDateString()
|
||||
starts_at?: string
|
||||
|
||||
@IsDateString()
|
||||
expires_at?: string
|
||||
|
||||
@IsEnum(LicenseStatus)
|
||||
status?: LicenseStatus
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Body, Controller, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
import { PartnerLicensesService } from './licenses.service'
|
||||
|
||||
@Controller('admin/licenses')
|
||||
export class LicensesController {
|
||||
constructor(private readonly licensesService: PartnerLicensesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.licensesService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.licensesService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateLicenseDto) {
|
||||
return this.licensesService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateLicenseDto) {
|
||||
return this.licensesService.update(id, data)
|
||||
}
|
||||
|
||||
// @Delete(':id')
|
||||
// async delete(@Param('id') id: string) {
|
||||
// return this.licensesService.delete(id)
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { LicensesController } from './licenses.controller'
|
||||
import { PartnerLicensesService } from './licenses.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [LicensesController],
|
||||
providers: [PartnerLicensesService],
|
||||
exports: [PartnerLicensesService],
|
||||
})
|
||||
export class AdminLicensesModule {}
|
||||
@@ -0,0 +1,122 @@
|
||||
import { LicenseInclude } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { LicenseStatus } from 'generated/prisma/enums'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PartnerLicensesService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
private readonly licenseInclude = {
|
||||
partner: true,
|
||||
pos: {
|
||||
include: {
|
||||
complex: true,
|
||||
provider: true,
|
||||
accounts: {
|
||||
include: {
|
||||
user: true,
|
||||
},
|
||||
omit: {
|
||||
business_id: true,
|
||||
partner_id: true,
|
||||
provider_id: true,
|
||||
pos_id: true,
|
||||
},
|
||||
},
|
||||
device: {
|
||||
include: {
|
||||
brand: true,
|
||||
},
|
||||
omit: {
|
||||
brand_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as LicenseInclude
|
||||
|
||||
async findAll() {
|
||||
const [licenses, count] = await this.prisma.$transaction([
|
||||
this.prisma.license.findMany({
|
||||
include: this.licenseInclude,
|
||||
omit: {
|
||||
pos_id: true,
|
||||
partner_id: true,
|
||||
},
|
||||
}),
|
||||
this.prisma.license.count(),
|
||||
])
|
||||
return ResponseMapper.paginate(
|
||||
licenses.map(license => {
|
||||
const { pos, ...rest } = license
|
||||
// @ts-ignore
|
||||
const { accounts, ...posRest } = pos
|
||||
return {
|
||||
account: accounts[0],
|
||||
pos: posRest,
|
||||
...rest,
|
||||
}
|
||||
}),
|
||||
{
|
||||
count,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const license = await this.prisma.license.findFirst({
|
||||
where: { id },
|
||||
include: this.licenseInclude,
|
||||
omit: {
|
||||
pos_id: true,
|
||||
partner_id: true,
|
||||
},
|
||||
})
|
||||
if (license) {
|
||||
const { pos, ...rest } = license
|
||||
// @ts-ignore
|
||||
const { accounts, ...posRest } = pos
|
||||
return ResponseMapper.single({
|
||||
account: accounts[0],
|
||||
pos: posRest,
|
||||
...rest,
|
||||
})
|
||||
}
|
||||
|
||||
return ResponseMapper.single(license)
|
||||
}
|
||||
|
||||
async create(data: CreateLicenseDto) {
|
||||
const date = new Date(data.starts_at || '')
|
||||
const expiresAt =
|
||||
data.expires_at || new Date(date.setFullYear(date.getFullYear() + 1))
|
||||
|
||||
const license = await this.prisma.license.create({
|
||||
data: {
|
||||
partner_id: data.partner_id,
|
||||
pos_id: data.pos_id,
|
||||
starts_at: date,
|
||||
expires_at: expiresAt,
|
||||
status: LicenseStatus.ACTIVE,
|
||||
},
|
||||
})
|
||||
|
||||
return ResponseMapper.create(license)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateLicenseDto) {
|
||||
const license = await this.prisma.license.update({
|
||||
where: { id },
|
||||
data: { ...data },
|
||||
})
|
||||
return ResponseMapper.update(license)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.license.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreatePartnerDto {
|
||||
@IsString()
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
code?: string
|
||||
}
|
||||
|
||||
export class UpdatePartnerDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
name?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
code?: string
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, LicenseStatus, POSType } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateLicenseDto {
|
||||
@IsString()
|
||||
first_name: string
|
||||
|
||||
@IsString()
|
||||
last_name: string
|
||||
|
||||
@IsString()
|
||||
mobile_number: string
|
||||
|
||||
@IsString()
|
||||
national_code: string
|
||||
|
||||
@IsString()
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
password: string
|
||||
|
||||
@IsEnum(AccountStatus)
|
||||
account_status: AccountStatus
|
||||
|
||||
@IsString()
|
||||
guild: string
|
||||
|
||||
@IsString()
|
||||
business_activity_name: string
|
||||
|
||||
@IsString()
|
||||
tax_id: string
|
||||
|
||||
@IsString()
|
||||
complex_name: string
|
||||
|
||||
@IsString()
|
||||
pos_serial: string
|
||||
|
||||
@IsString()
|
||||
pos_status: string
|
||||
|
||||
@IsEnum(POSType)
|
||||
pos_type: POSType
|
||||
|
||||
@IsString()
|
||||
pos_device: string
|
||||
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
starts_at: string
|
||||
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
expires_at: string
|
||||
}
|
||||
|
||||
export class UpdateLicenseDto {
|
||||
@IsString()
|
||||
pos_id?: string
|
||||
|
||||
@IsDateString()
|
||||
starts_at?: string
|
||||
|
||||
@IsDateString()
|
||||
expires_at?: string
|
||||
|
||||
@IsEnum(LicenseStatus)
|
||||
status?: LicenseStatus
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
import { PartnerLicensesService } from './licenses.service'
|
||||
|
||||
@Controller('admin/partners/:partnerId/licenses')
|
||||
export class PartnerLicensesController {
|
||||
constructor(private readonly licensesService: PartnerLicensesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('partnerId') partnerId: string) {
|
||||
return this.licensesService.findAll(partnerId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('partnerId') partnerId: string, @Param('id') id: string) {
|
||||
return this.licensesService.findOne(partnerId, id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Param('partnerId') partnerId: string, @Body() data: CreateLicenseDto) {
|
||||
return this.licensesService.create(partnerId, data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(
|
||||
@Param('partnerId') partnerId: string,
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateLicenseDto,
|
||||
) {
|
||||
return this.licensesService.update(partnerId, id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('partnerId') partnerId: string, @Param('id') id: string) {
|
||||
return this.licensesService.delete(partnerId, id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { PartnerLicensesController } from './licenses.controller'
|
||||
import { PartnerLicensesService } from './licenses.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [PartnerLicensesController],
|
||||
providers: [PartnerLicensesService],
|
||||
exports: [PartnerLicensesService],
|
||||
})
|
||||
export class AdminPartnerLicensesModule {}
|
||||
@@ -0,0 +1,197 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PartnerLicensesService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll(partnerId: string) {
|
||||
const licenses = await this.prisma.license.findMany({
|
||||
where: { partner_id: partnerId },
|
||||
include: {
|
||||
pos: {
|
||||
include: {
|
||||
complex: true,
|
||||
provider: true,
|
||||
|
||||
accounts: {
|
||||
include: {
|
||||
user: true,
|
||||
},
|
||||
omit: {
|
||||
business_id: true,
|
||||
partner_id: true,
|
||||
provider_id: true,
|
||||
pos_id: true,
|
||||
},
|
||||
},
|
||||
device: {
|
||||
include: {
|
||||
brand: true,
|
||||
},
|
||||
omit: {
|
||||
brand_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: {
|
||||
pos_id: true,
|
||||
partner_id: true,
|
||||
},
|
||||
})
|
||||
return ResponseMapper.list(
|
||||
licenses.map(license => {
|
||||
const { pos, ...rest } = license
|
||||
const { accounts, ...posRest } = pos
|
||||
return {
|
||||
account: accounts[0],
|
||||
pos: posRest,
|
||||
...rest,
|
||||
}
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
async findOne(partnerId: string, id: string) {
|
||||
const license = await this.prisma.license.findFirst({
|
||||
where: { id, partner_id: partnerId },
|
||||
include: {
|
||||
pos: {
|
||||
include: {
|
||||
complex: true,
|
||||
provider: true,
|
||||
|
||||
accounts: {
|
||||
include: {
|
||||
user: true,
|
||||
},
|
||||
omit: {
|
||||
business_id: true,
|
||||
partner_id: true,
|
||||
provider_id: true,
|
||||
pos_id: true,
|
||||
},
|
||||
},
|
||||
device: {
|
||||
include: {
|
||||
brand: true,
|
||||
},
|
||||
omit: {
|
||||
brand_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: {
|
||||
pos_id: true,
|
||||
partner_id: true,
|
||||
},
|
||||
})
|
||||
if (license) {
|
||||
const { pos, ...rest } = license
|
||||
const { accounts, ...posRest } = pos
|
||||
return ResponseMapper.single({
|
||||
account: accounts[0],
|
||||
pos: posRest,
|
||||
...rest,
|
||||
})
|
||||
}
|
||||
|
||||
return ResponseMapper.single(license)
|
||||
}
|
||||
|
||||
async create(partnerId: string, data: CreateLicenseDto) {
|
||||
// const license = await this.prisma.$transaction(async tx => {
|
||||
// const user = await tx.user.upsert({
|
||||
// where: {
|
||||
// mobile_number: data.mobile_number,
|
||||
// },
|
||||
// update: {},
|
||||
// create: {
|
||||
// first_name: data.first_name,
|
||||
// last_name: data.last_name,
|
||||
// mobile_number: data.mobile_number,
|
||||
// national_code: data.national_code,
|
||||
// },
|
||||
// })
|
||||
|
||||
// const business = await tx.businessActivity.create({
|
||||
// data: {
|
||||
// name: data.business_activity_name,
|
||||
// guild_id: data.guild,
|
||||
// user: {
|
||||
// connect: {
|
||||
// id: user.id,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
|
||||
// const complex = await tx.complex.create({
|
||||
// data: {
|
||||
// name: data.complex_name,
|
||||
// tax_id: data.tax_id,
|
||||
// business_activity_id: business.id,
|
||||
// },
|
||||
// })
|
||||
|
||||
// const pos = await tx.pos.create({
|
||||
// data: {
|
||||
// pos_type: data.pos_type,
|
||||
// serial: data.pos_serial,
|
||||
// device_id: data.pos_device,
|
||||
// complex_id: complex.id,
|
||||
// },
|
||||
// })
|
||||
|
||||
// const date = new Date()
|
||||
// const expiresAt = new Date(date.setFullYear(date.getFullYear() + 1))
|
||||
|
||||
// const license = await tx.license.create({
|
||||
// data: {
|
||||
// partner_id: partnerId,
|
||||
// pos_id: pos.id,
|
||||
// starts_at: data.starts_at || new Date(),
|
||||
// expires_at: data.expires_at || expiresAt,
|
||||
// status: LicenseStatus.ACTIVE,
|
||||
// },
|
||||
// })
|
||||
|
||||
// const hashedPassword = await PasswordUtil.hash(data.password)
|
||||
|
||||
// const account = await tx.account.create({
|
||||
// data: {
|
||||
// username: data.username,
|
||||
// password: hashedPassword,
|
||||
// type: AccountType.POS,
|
||||
// user_id: user.id,
|
||||
// pos_id: pos.id,
|
||||
// status: data.account_status,
|
||||
// },
|
||||
// })
|
||||
|
||||
// return {
|
||||
// license,
|
||||
// }
|
||||
// })
|
||||
return ResponseMapper.create('license')
|
||||
}
|
||||
|
||||
async update(partnerId: string, id: string, data: UpdateLicenseDto) {
|
||||
const license = await this.prisma.license.update({
|
||||
where: { id },
|
||||
data: { ...data, partner_id: partnerId },
|
||||
})
|
||||
return ResponseMapper.update(license)
|
||||
}
|
||||
|
||||
async delete(partnerId: string, id: string) {
|
||||
await this.prisma.license.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { AccountsService } from './accounts.service'
|
||||
import { CreateAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
|
||||
@Controller('admin/partners/:partnerId/accounts')
|
||||
export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('partnerId') partnerId: string) {
|
||||
return this.accountsService.findAll(partnerId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.accountsService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Param('partnerId') partnerId: string, @Body() data: CreateAccountDto) {
|
||||
return this.accountsService.create(partnerId, data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto) {
|
||||
return this.accountsService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.accountsService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { AccountsController } from './accounts.controller'
|
||||
import { AccountsService } from './accounts.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [AccountsController],
|
||||
providers: [AccountsService],
|
||||
exports: [AccountsService],
|
||||
})
|
||||
export class AdminPartnerAccountsModule {}
|
||||
@@ -0,0 +1,82 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { PasswordUtil } from 'common/utils/password.util'
|
||||
import { AccountType } from 'generated/prisma/enums'
|
||||
import { CreateAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
|
||||
@Injectable()
|
||||
export class AccountsService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll(partnerId: string) {
|
||||
const accounts = await this.prisma.account.findMany({
|
||||
where: { partner_id: partnerId },
|
||||
omit: {
|
||||
password: true,
|
||||
user_id: true,
|
||||
partner_id: true,
|
||||
type: true,
|
||||
pos_id: true,
|
||||
provider_id: true,
|
||||
business_id: true,
|
||||
},
|
||||
})
|
||||
return ResponseMapper.list(accounts)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const account = await this.prisma.account.findUnique({
|
||||
where: { id },
|
||||
omit: { password: true, user_id: true },
|
||||
include: {
|
||||
partner: true,
|
||||
user: true,
|
||||
},
|
||||
})
|
||||
return ResponseMapper.single(account)
|
||||
}
|
||||
|
||||
async create(partnerId: string, data: CreateAccountDto) {
|
||||
const { username, status, password, ...userData } = data
|
||||
|
||||
const result = await this.prisma.$transaction(async tx => {
|
||||
let user = await tx.user.upsert({
|
||||
where: {
|
||||
mobile_number: userData.mobile_number,
|
||||
},
|
||||
update: {},
|
||||
create: userData,
|
||||
})
|
||||
|
||||
const hashedPassword = await PasswordUtil.hash(password)
|
||||
|
||||
const dataToCreate = {
|
||||
username,
|
||||
status,
|
||||
password: hashedPassword,
|
||||
user_id: user.id,
|
||||
type: AccountType.PARTNER,
|
||||
partner_id: partnerId, // Connect account to partner
|
||||
}
|
||||
|
||||
const account = await tx.account.create({
|
||||
data: dataToCreate,
|
||||
})
|
||||
|
||||
return account
|
||||
})
|
||||
|
||||
return ResponseMapper.create(result)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateAccountDto) {
|
||||
const account = await this.prisma.account.update({ where: { id }, data })
|
||||
return ResponseMapper.update(account)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.account.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, AccountType } from 'generated/prisma/enums'
|
||||
import { CreateUserDto } from '../../../users/dto/user.dto'
|
||||
|
||||
export class CreateAccountDto extends CreateUserDto {
|
||||
@IsString()
|
||||
username: string
|
||||
|
||||
@IsEnum(AccountStatus)
|
||||
status: AccountStatus
|
||||
|
||||
@IsString()
|
||||
password: string
|
||||
}
|
||||
|
||||
export class UpdateAccountDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
username?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountType)
|
||||
type?: AccountType
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountStatus)
|
||||
status?: AccountStatus
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
password?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
user_id?: string
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { CreatePartnerDto, UpdatePartnerDto } from './dto/partner.dto'
|
||||
import { PartnersService } from './partners.service'
|
||||
|
||||
@Controller('admin/partners')
|
||||
export class PartnersController {
|
||||
constructor(private readonly partnersService: PartnersService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.partnersService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.partnersService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreatePartnerDto) {
|
||||
return this.partnersService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdatePartnerDto) {
|
||||
return this.partnersService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.partnersService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
|
||||
import { AdminPartnerLicensesModule } from './licenses/licenses.module'
|
||||
import { AdminPartnerAccountsModule } from './partnerAccounts/accounts.module'
|
||||
import { PartnersController } from './partners.controller'
|
||||
import { PartnersService } from './partners.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule, AdminPartnerLicensesModule, AdminPartnerAccountsModule],
|
||||
controllers: [PartnersController],
|
||||
providers: [PartnersService],
|
||||
exports: [PartnersService],
|
||||
})
|
||||
export class AdminPartnersModule {}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreatePartnerDto, UpdatePartnerDto } from './dto/partner.dto'
|
||||
|
||||
@Injectable()
|
||||
export class PartnersService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll() {
|
||||
const partners = await this.prisma.partner.findMany()
|
||||
return ResponseMapper.list(partners)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const partner = await this.prisma.partner.findUnique({
|
||||
where: { id },
|
||||
})
|
||||
return ResponseMapper.single(partner)
|
||||
}
|
||||
|
||||
async create(data: CreatePartnerDto) {
|
||||
const partner = await this.prisma.partner.create({ data })
|
||||
return ResponseMapper.create(partner)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdatePartnerDto) {
|
||||
const partner = await this.prisma.partner.update({ where: { id }, data })
|
||||
return ResponseMapper.update(partner)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.partner.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateProviderDto {
|
||||
@IsString()
|
||||
name: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
code?: string
|
||||
}
|
||||
|
||||
export class UpdateProviderDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
name?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
code?: string
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { CreateProviderDto, UpdateProviderDto } from './dto/provider.dto'
|
||||
import { ProvidersService } from './providers.service'
|
||||
|
||||
@ApiTags('Admin Partners')
|
||||
@Controller('admin/providers')
|
||||
export class ProvidersController {
|
||||
constructor(private readonly providersService: ProvidersService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.providersService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.providersService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateProviderDto) {
|
||||
return this.providersService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateProviderDto) {
|
||||
return this.providersService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.providersService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { ProvidersController } from './providers.controller'
|
||||
import { ProvidersService } from './providers.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [ProvidersController],
|
||||
providers: [ProvidersService],
|
||||
exports: [ProvidersService],
|
||||
})
|
||||
export class AdminProvidersModule {}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateProviderDto, UpdateProviderDto } from './dto/provider.dto'
|
||||
|
||||
@Injectable()
|
||||
export class ProvidersService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll() {
|
||||
const providers = await this.prisma.provider.findMany()
|
||||
return ResponseMapper.list(providers)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const provider = await this.prisma.provider.findUnique({
|
||||
where: { id },
|
||||
include: { pos_list: true, accounts: true },
|
||||
})
|
||||
return ResponseMapper.single(provider)
|
||||
}
|
||||
|
||||
async create(data: CreateProviderDto) {
|
||||
const provider = await this.prisma.provider.create({ data })
|
||||
return ResponseMapper.create(provider)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateProviderDto) {
|
||||
const provider = await this.prisma.provider.update({ where: { id }, data })
|
||||
return ResponseMapper.update(provider)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.provider.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Controller, Get } from '@nestjs/common'
|
||||
import { TranslateService } from './translate.service'
|
||||
|
||||
@Controller('admin/translates')
|
||||
export class TranslateController {
|
||||
constructor(private readonly translateService: TranslateService) {}
|
||||
|
||||
@Get()
|
||||
async getTranslations() {
|
||||
return this.translateService.getTranslations()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { TranslateController } from './translate.controller'
|
||||
import { TranslateService } from './translate.service'
|
||||
|
||||
@Module({
|
||||
controllers: [TranslateController],
|
||||
providers: [TranslateService],
|
||||
exports: [TranslateService],
|
||||
})
|
||||
export class AdminTranslateModule {}
|
||||
@@ -0,0 +1,68 @@
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
|
||||
@Injectable()
|
||||
export class TranslateService {
|
||||
getTranslations() {
|
||||
return ResponseMapper.single({
|
||||
attributes: {
|
||||
id: 'شناسه',
|
||||
username: 'نام کاربری',
|
||||
status: 'وضعیت',
|
||||
created_at: 'تاریخ ایجاد',
|
||||
updated_at: 'تاریخ بروزرسانی',
|
||||
actions: 'عملیات',
|
||||
first_name: 'نام',
|
||||
last_name: 'نام خانوادگی',
|
||||
mobile_number: 'تلفن همراه',
|
||||
national_code: 'کد ملی',
|
||||
name: 'عنوان',
|
||||
os_version: 'نسخه سیستم عامل',
|
||||
code: 'کد شناسایی',
|
||||
fullname: 'نام کامل',
|
||||
'brand.name': 'عنوان برند',
|
||||
'pos.name': 'عنوان صنف',
|
||||
'pos.complex.name': 'عنوان مجموعه',
|
||||
'pos.devices.name': 'عنوان دستگاه',
|
||||
'pos.provider.name': 'عنوان ارایهدهنده',
|
||||
goods_count: 'تعداد کالاها',
|
||||
brand: 'برند',
|
||||
licenses: 'لایسنس',
|
||||
business_activity: 'فعالیت اقتصادی',
|
||||
user: 'کاربر',
|
||||
},
|
||||
singular: {
|
||||
users: 'کاربر',
|
||||
devices: 'دستگاه',
|
||||
device_brands: 'برند',
|
||||
guilds: 'صنف',
|
||||
guild_goods: 'کالا',
|
||||
guild_good_categories: 'دستهبندی کالا',
|
||||
partners: 'شریک تجاری',
|
||||
partner_accounts: 'حساب',
|
||||
partner_licenses: 'مجوز',
|
||||
providers: 'ارائهدهنده',
|
||||
provider_accounts: 'حساب',
|
||||
accounts: 'حساب کاربری',
|
||||
licenses: 'لایسنس',
|
||||
business_activities: 'فعالیت اقتصادی',
|
||||
},
|
||||
plural: {
|
||||
users: 'کاربران',
|
||||
devices: 'دستگاهها',
|
||||
device_brands: 'برندها',
|
||||
guilds: 'اصناف',
|
||||
guild_goods: 'کالاها',
|
||||
guild_good_categories: 'دستهبندی کالاها',
|
||||
partners: 'شرکای تجاری',
|
||||
partner_accounts: 'حسابهای شریک تجاری',
|
||||
partner_licenses: 'مجوزهای داده شده',
|
||||
providers: 'ارائهدهندگان',
|
||||
provider_accounts: 'حسابهای ارائهدهنده',
|
||||
accounts: 'حسابهای کاربری',
|
||||
licenses: 'لایسنسها',
|
||||
business_activities: 'فعالیتهای اقتصادی',
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { AccountsService } from './accounts.service'
|
||||
import { CreateAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
|
||||
@ApiTags('AdminAccounts')
|
||||
@Controller('admin/users/:userId/accounts')
|
||||
export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('userId') userId: string) {
|
||||
return this.accountsService.findAll(userId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.accountsService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreateAccountDto) {
|
||||
return this.accountsService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto) {
|
||||
return this.accountsService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.accountsService.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { AccountsController } from './accounts.controller'
|
||||
import { AccountsService } from './accounts.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [AccountsController],
|
||||
providers: [AccountsService],
|
||||
exports: [AccountsService],
|
||||
})
|
||||
export class AdminUserAccountsModule {}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
|
||||
@Injectable()
|
||||
export class AccountsService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll(userId: string) {
|
||||
const accounts = await this.prisma.account.findMany({
|
||||
where: { user_id: userId },
|
||||
omit: { password: true, user_id: true },
|
||||
})
|
||||
return ResponseMapper.list(accounts)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const account = await this.prisma.account.findUnique({
|
||||
where: { id },
|
||||
omit: { password: true, user_id: true },
|
||||
include: {
|
||||
pos: true,
|
||||
business: true,
|
||||
provider: true,
|
||||
partner: true,
|
||||
},
|
||||
})
|
||||
return ResponseMapper.single(account)
|
||||
}
|
||||
|
||||
async create(data: CreateAccountDto) {
|
||||
// Assuming password hashing is handled elsewhere or add bcrypt here
|
||||
const account = await this.prisma.account.create({ data })
|
||||
return ResponseMapper.create(account)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateAccountDto) {
|
||||
const account = await this.prisma.account.update({ where: { id }, data })
|
||||
return ResponseMapper.update(account)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.account.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, AccountType } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateAccountDto {
|
||||
@IsString()
|
||||
username: string
|
||||
|
||||
@IsEnum(AccountType)
|
||||
type: AccountType
|
||||
|
||||
@IsEnum(AccountStatus)
|
||||
status: AccountStatus
|
||||
|
||||
@IsString()
|
||||
password: string
|
||||
|
||||
@IsString()
|
||||
user_id: string
|
||||
}
|
||||
|
||||
export class UpdateAccountDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
username?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountType)
|
||||
type?: AccountType
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(AccountStatus)
|
||||
status?: AccountStatus
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
password?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
user_id?: string
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { BusinessActivitiesService } from './business-activities.service'
|
||||
import { CreateBusinessActivitiesDto } from './dto/create-business-activities.dto'
|
||||
|
||||
@Controller('admin/users/:userId/business_activities')
|
||||
export class BusinessActivitiesController {
|
||||
constructor(private readonly businessActivitiesService: BusinessActivitiesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('userId') userId: string) {
|
||||
return this.businessActivitiesService.findAll(userId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('userId') userId: string, @Param('id') id: string) {
|
||||
return this.businessActivitiesService.findOne(userId, id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(
|
||||
@Param('userId') userId: string,
|
||||
@Body() data: CreateBusinessActivitiesDto,
|
||||
) {
|
||||
return this.businessActivitiesService.create(userId, data)
|
||||
}
|
||||
|
||||
// @Put(':id')
|
||||
// async update(
|
||||
// @Param('userId') userId: string,
|
||||
// @Param('id') id: string,
|
||||
// @Body() data: UpdateBusinessActivityDto,
|
||||
// ) {
|
||||
// return this.businessActivitiesService.update(userId, id, data)
|
||||
// }
|
||||
|
||||
// @Delete(':id')
|
||||
// async delete(@Param('id') id: string) {
|
||||
// return this.businessActivitiesService.delete(id)
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { PrismaModule } from '@/prisma/prisma.module'
|
||||
import { Module } from '@nestjs/common'
|
||||
import { BusinessActivitiesController } from './business-activities.controller'
|
||||
import { BusinessActivitiesService } from './business-activities.service'
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule],
|
||||
controllers: [BusinessActivitiesController],
|
||||
providers: [BusinessActivitiesService],
|
||||
})
|
||||
export class AdminUserBusinessActivitiesModule {}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateBusinessActivitiesDto } from './dto/create-business-activities.dto'
|
||||
|
||||
@Injectable()
|
||||
export class BusinessActivitiesService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async findAll(userId: string) {
|
||||
const businessActivities = await this.prisma.businessActivity.findMany({
|
||||
where: {
|
||||
owner_id: userId,
|
||||
},
|
||||
})
|
||||
return ResponseMapper.list(businessActivities)
|
||||
}
|
||||
|
||||
async findOne(userId: string, id: string) {
|
||||
const businessActivity = await this.prisma.businessActivity.findUnique({
|
||||
where: { owner_id: userId, id },
|
||||
})
|
||||
return ResponseMapper.single(businessActivity)
|
||||
}
|
||||
|
||||
async create(userId: string, data: CreateBusinessActivitiesDto) {
|
||||
const businessActivity = await this.prisma.businessActivity.create({
|
||||
data: {
|
||||
name: data.name,
|
||||
guild: {
|
||||
connect: {
|
||||
id: data.guild_id,
|
||||
},
|
||||
},
|
||||
user: {
|
||||
connect: {
|
||||
id: userId,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
return ResponseMapper.create(businessActivity)
|
||||
}
|
||||
|
||||
async update(id: string, data: any) {
|
||||
const businessActivity = await this.prisma.businessActivity.update({
|
||||
where: { id },
|
||||
data,
|
||||
})
|
||||
return ResponseMapper.update(businessActivity)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.businessActivity.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { IsString } from 'class-validator'
|
||||
|
||||
export class CreateBusinessActivitiesDto {
|
||||
@IsString()
|
||||
@ApiProperty({})
|
||||
name: string
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({})
|
||||
guild_id: string
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/swagger'
|
||||
import { CreateBusinessActivitiesDto } from './create-business-activities.dto'
|
||||
|
||||
export class UpdateBusinessActivityDto extends PartialType(CreateBusinessActivitiesDto) {}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user