update pos consumer module
This commit is contained in:
@@ -9,7 +9,6 @@ import { EnumsModule } from './modules/enums/enums.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 { ServiceCategoriesModule } from './modules/service-categories/service-categories.module'
|
||||
import { ServicesModule } from './modules/services/services.module'
|
||||
import { TriggerLogsModule } from './modules/trigger-logs/trigger-logs.module'
|
||||
@@ -31,7 +30,6 @@ import { PrismaModule } from './prisma/prisma.module'
|
||||
ServicesModule,
|
||||
TriggerLogsModule,
|
||||
UploadersModule,
|
||||
ProfileModule,
|
||||
],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
BadRequestException,
|
||||
createParamDecorator,
|
||||
ExecutionContext,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common'
|
||||
import { Request } from 'express'
|
||||
import { IPosPayload } from '../models/posPayload.model'
|
||||
|
||||
export const PosInfo = createParamDecorator(
|
||||
(data: keyof IPosPayload | undefined, ctx: ExecutionContext) => {
|
||||
try {
|
||||
const request = ctx.switchToHttp().getRequest<Request>()
|
||||
const posInfo = request.posData
|
||||
|
||||
if (!posInfo) {
|
||||
throw new UnauthorizedException('شما به این بخش دسترسی ندارید')
|
||||
}
|
||||
|
||||
if (data) {
|
||||
return posInfo[data]
|
||||
}
|
||||
|
||||
return posInfo
|
||||
} catch (err) {
|
||||
throw new BadRequestException('مشکلی در ساختار درخواست شما وجود دارد.')
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AccessTokenPayload } from '@/modules/auth/models'
|
||||
import { AccessTokenPayload } from '@/common/models/tokenPayload.model'
|
||||
import {
|
||||
BadRequestException,
|
||||
createParamDecorator,
|
||||
@@ -29,6 +29,8 @@ export const TokenAccount = createParamDecorator(
|
||||
// ✅ if called with no param — return full account object
|
||||
return account
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
|
||||
throw new BadRequestException('مشکلی در ساختار درخواست شما وجود دارد.')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8,15 +8,11 @@ import { Response } from 'express'
|
||||
|
||||
@Catch(BadRequestException)
|
||||
export class ValidationExceptionFilter implements ExceptionFilter {
|
||||
constructor() {
|
||||
console.log('ValidationExceptionFilter initialized')
|
||||
}
|
||||
catch(exception: BadRequestException, host: ArgumentsHost) {
|
||||
const ctx = host.switchToHttp()
|
||||
const response = ctx.getResponse<Response>()
|
||||
const status = exception.getStatus()
|
||||
const exceptionResponse = exception.getResponse()
|
||||
console.log(exception)
|
||||
|
||||
response.status(status).json({
|
||||
statusCode: status,
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
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 { Request as ExpressRequest } from 'express'
|
||||
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||
import { IWithJWTPayloadRequest } from '../models/token-model'
|
||||
|
||||
@Injectable()
|
||||
export class JwtAuthGuard implements CanActivate {
|
||||
@@ -23,7 +23,7 @@ export class JwtAuthGuard implements CanActivate {
|
||||
])
|
||||
if (isPublic) return true
|
||||
|
||||
const req = context.switchToHttp().getRequest<IWithJWTPayloadRequest>()
|
||||
const req = context.switchToHttp().getRequest<ExpressRequest>()
|
||||
|
||||
let token: string | undefined = req.cookies?.accessToken
|
||||
if (!token) {
|
||||
@@ -38,15 +38,15 @@ export class JwtAuthGuard implements CanActivate {
|
||||
if (!token) throw new UnauthorizedException('Missing access token')
|
||||
|
||||
try {
|
||||
const payload = this.jwt.verify(token, {
|
||||
secret: process.env.JWT_SECRET || 'secret',
|
||||
this.jwt.verify(token, {
|
||||
secret: process.env.JWT_SECRET,
|
||||
})
|
||||
|
||||
// if (payload.type !== 'POS')
|
||||
// throw new UnauthorizedException('Invalid or expired token')
|
||||
|
||||
// Set the typed dataPayload to the request
|
||||
req.dataPayload = payload
|
||||
// req.dataPayload = payload
|
||||
|
||||
return true
|
||||
} catch (err) {
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
// src/common/guards/permissions.guard.ts
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import {
|
||||
CanActivate,
|
||||
ExecutionContext,
|
||||
ForbiddenException,
|
||||
Injectable,
|
||||
} from '@nestjs/common'
|
||||
import { Reflector } from '@nestjs/core'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { Request as ExpressRequest } from 'express'
|
||||
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||
import { checkAndDecodeJwtToken } from '../utils/jwt-user.util'
|
||||
|
||||
@Injectable()
|
||||
export class PosGuard implements CanActivate {
|
||||
constructor(
|
||||
private jwt: JwtService,
|
||||
private reflector: Reflector,
|
||||
private prisma: PrismaService,
|
||||
) {}
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
||||
context.getHandler(),
|
||||
context.getClass(),
|
||||
])
|
||||
if (isPublic) return true
|
||||
|
||||
// const requiredPermissions = this.reflector.get<string[]>(
|
||||
// 'permissions',
|
||||
// context.getHandler(),
|
||||
// )
|
||||
// if (!requiredPermissions || requiredPermissions.length === 0) return true
|
||||
|
||||
const req = context.switchToHttp().getRequest<ExpressRequest>()
|
||||
|
||||
const account = checkAndDecodeJwtToken(req, this.jwt)
|
||||
// const account = req.decodedToken
|
||||
|
||||
if (!req.url.startsWith('/api/v1/pos/')) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (!account || account.type !== 'CONSUMER')
|
||||
throw new ForbiddenException('شما دسترسی لازم را ندارید.')
|
||||
|
||||
const cookie = req.cookies
|
||||
const { posId, accessToken } = cookie
|
||||
|
||||
if (!posId || !accessToken) {
|
||||
return false
|
||||
}
|
||||
|
||||
const pos = await this.prisma.pos.findUnique({
|
||||
where: {
|
||||
id: posId,
|
||||
complex: {
|
||||
business_activity: {
|
||||
user: {
|
||||
accounts: {
|
||||
some: {
|
||||
account_id: account.account_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
select: {
|
||||
complex: {
|
||||
select: {
|
||||
id: true,
|
||||
business_activity_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
if (!pos) {
|
||||
throw new ForbiddenException('شما دسترسی لازم را ندارید.')
|
||||
}
|
||||
|
||||
const foundedAccount = await this.prisma.account.findUnique({
|
||||
where: {
|
||||
id: account.account_id,
|
||||
},
|
||||
select: {
|
||||
consumer_account: {
|
||||
select: {
|
||||
role: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
if (foundedAccount?.consumer_account?.role === 'OWNER') {
|
||||
return true
|
||||
}
|
||||
|
||||
const accountPermissions = await this.prisma.permissionConsumer.findUnique({
|
||||
where: {
|
||||
account_id: account.account_id,
|
||||
},
|
||||
select: {
|
||||
posPermissions: true,
|
||||
businessPermissions: true,
|
||||
complexPermissions: true,
|
||||
},
|
||||
})
|
||||
|
||||
if (accountPermissions?.posPermissions.some(p => p.pos_id === posId)) {
|
||||
return true
|
||||
}
|
||||
if (
|
||||
accountPermissions?.complexPermissions.some(p => p.complex_id === pos.complex.id)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
if (
|
||||
accountPermissions?.businessPermissions.some(
|
||||
p => p.business_id === pos.complex.business_activity_id,
|
||||
)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
throw new ForbiddenException('شما دسترسی لازم را ندارید.')
|
||||
}
|
||||
}
|
||||
@@ -6,3 +6,5 @@ export interface SaleInvoiceGoldTypePayload {
|
||||
profit: number
|
||||
}
|
||||
export interface SaleInvoiceStandardPayload {}
|
||||
|
||||
export type SaleInvoiceType = SaleInvoiceGoldTypePayload | SaleInvoiceStandardPayload
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface IPosPayload {
|
||||
pos_id: string
|
||||
complex_id: string
|
||||
guild_id: string
|
||||
business_id: string
|
||||
consumer_account_id: string
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import { Request as ExpressRequest } from 'express'
|
||||
import { AccountType } from '../enums/enums'
|
||||
|
||||
export interface IWithJWTPayloadRequest extends ExpressRequest {
|
||||
dataPayload?: AccessTokenPayload
|
||||
}
|
||||
|
||||
export interface AccessTokenPayload {
|
||||
userId: string
|
||||
mobile_number: string
|
||||
type: AccountType
|
||||
username: string
|
||||
pos_id: number
|
||||
pos_name: string
|
||||
|
||||
complex_id: string
|
||||
license_id: string
|
||||
license_expired_at: string
|
||||
// complex: {
|
||||
// id: string
|
||||
// name: string
|
||||
// }
|
||||
// license: {
|
||||
// id: string
|
||||
// starts_at: string
|
||||
// expires_at: string
|
||||
// status: string
|
||||
// }
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
import { Request as ExpressRequest } from 'express'
|
||||
import { AccountType } from '../../../generated/prisma/enums'
|
||||
|
||||
export interface IWithJWTPayloadRequest extends ExpressRequest {
|
||||
dataPayload?: AccessTokenPayload
|
||||
}
|
||||
import { AccountType } from '../../generated/prisma/enums'
|
||||
|
||||
export interface AccessTokenPayload {
|
||||
account_id: string
|
||||
@@ -1,8 +1,8 @@
|
||||
import { AccessTokenPayload } from '@/common/models/tokenPayload.model'
|
||||
import { ITokenPayload } from '@/modules/auth/auth.utils'
|
||||
import { UnauthorizedException } from '@nestjs/common'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { Request } from 'express'
|
||||
import { AccessTokenPayload } from 'modules/auth/models'
|
||||
|
||||
export function checkAndDecodeJwtToken(
|
||||
req: Request,
|
||||
|
||||
@@ -385,17 +385,6 @@ export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeNullableFilter<$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 EnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
@@ -408,7 +397,7 @@ export type BoolNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
@@ -416,10 +405,7 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
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>
|
||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||
}
|
||||
|
||||
export type EnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
@@ -440,6 +426,20 @@ export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeNullableWithAggregatesFilter<$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 BoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
@@ -997,17 +997,6 @@ 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[]
|
||||
@@ -1020,7 +1009,7 @@ export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
@@ -1028,10 +1017,7 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
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>
|
||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||
}
|
||||
|
||||
export type NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
@@ -1052,6 +1038,20 @@ export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedBoolNullableFilter<$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
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2842,12 +2842,11 @@ export type UserDevicesScalarFieldEnum = (typeof UserDevicesScalarFieldEnum)[key
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
type: 'type',
|
||||
is_favorite: 'is_favorite',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at',
|
||||
type: 'type',
|
||||
complex_id: 'complex_id',
|
||||
is_favorite: 'is_favorite'
|
||||
deleted_at: 'deleted_at'
|
||||
} as const
|
||||
|
||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||
@@ -2937,7 +2936,7 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
updated_at: 'updated_at',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -3239,8 +3238,7 @@ export type UserDevicesOrderByRelevanceFieldEnum = (typeof UserDevicesOrderByRel
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
complex_id: 'complex_id'
|
||||
id: 'id'
|
||||
} as const
|
||||
|
||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||
@@ -3329,7 +3327,7 @@ export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
notes: 'notes',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||
|
||||
@@ -357,12 +357,11 @@ export type UserDevicesScalarFieldEnum = (typeof UserDevicesScalarFieldEnum)[key
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
type: 'type',
|
||||
is_favorite: 'is_favorite',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at',
|
||||
type: 'type',
|
||||
complex_id: 'complex_id',
|
||||
is_favorite: 'is_favorite'
|
||||
deleted_at: 'deleted_at'
|
||||
} as const
|
||||
|
||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||
@@ -452,7 +451,7 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
updated_at: 'updated_at',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -754,8 +753,7 @@ export type UserDevicesOrderByRelevanceFieldEnum = (typeof UserDevicesOrderByRel
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
complex_id: 'complex_id'
|
||||
id: 'id'
|
||||
} as const
|
||||
|
||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||
@@ -844,7 +842,7 @@ export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
notes: 'notes',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
complex_id: 'complex_id'
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||
|
||||
@@ -203,6 +203,8 @@ export type ComplexWhereInput = {
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permissionComplexes?: Prisma.PermissionComplexListRelationFilter
|
||||
customerIndividuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customerLegals?: Prisma.CustomerLegalListRelationFilter
|
||||
}
|
||||
|
||||
export type ComplexOrderByWithRelationInput = {
|
||||
@@ -218,6 +220,8 @@ export type ComplexOrderByWithRelationInput = {
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
good_categories?: Prisma.GoodCategoryOrderByRelationAggregateInput
|
||||
permissionComplexes?: Prisma.PermissionComplexOrderByRelationAggregateInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualOrderByRelationAggregateInput
|
||||
customerLegals?: Prisma.CustomerLegalOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ComplexOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -237,6 +241,8 @@ export type ComplexWhereUniqueInput = Prisma.AtLeast<{
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permissionComplexes?: Prisma.PermissionComplexListRelationFilter
|
||||
customerIndividuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customerLegals?: Prisma.CustomerLegalListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type ComplexOrderByWithAggregationInput = {
|
||||
@@ -277,6 +283,8 @@ export type ComplexCreateInput = {
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateInput = {
|
||||
@@ -291,6 +299,8 @@ export type ComplexUncheckedCreateInput = {
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateInput = {
|
||||
@@ -305,6 +315,8 @@ export type ComplexUpdateInput = {
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateInput = {
|
||||
@@ -319,6 +331,8 @@ export type ComplexUncheckedUpdateInput = {
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyInput = {
|
||||
@@ -476,6 +490,34 @@ export type ComplexUpdateOneRequiredWithoutPermissionComplexesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutPermissionComplexesInput, Prisma.ComplexUpdateWithoutPermissionComplexesInput>, Prisma.ComplexUncheckedUpdateWithoutPermissionComplexesInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutCustomerIndividualsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomerIndividualsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutCustomerIndividualsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomerIndividualsInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutCustomerIndividualsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutCustomerIndividualsInput, Prisma.ComplexUpdateWithoutCustomerIndividualsInput>, Prisma.ComplexUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutCustomerLegalsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedCreateWithoutCustomerLegalsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomerLegalsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutCustomerLegalsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedCreateWithoutCustomerLegalsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomerLegalsInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutCustomerLegalsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutCustomerLegalsInput, Prisma.ComplexUpdateWithoutCustomerLegalsInput>, Prisma.ComplexUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutGoodsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutGoodsInput, Prisma.ComplexUncheckedCreateWithoutGoodsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutGoodsInput
|
||||
@@ -519,6 +561,8 @@ export type ComplexCreateWithoutBusiness_activityInput = {
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
@@ -532,6 +576,8 @@ export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutBusiness_activityInput = {
|
||||
@@ -584,6 +630,8 @@ export type ComplexCreateWithoutPos_listInput = {
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPos_listInput = {
|
||||
@@ -597,6 +645,8 @@ export type ComplexUncheckedCreateWithoutPos_listInput = {
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPos_listInput = {
|
||||
@@ -626,6 +676,8 @@ export type ComplexUpdateWithoutPos_listInput = {
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPos_listInput = {
|
||||
@@ -639,6 +691,8 @@ export type ComplexUncheckedUpdateWithoutPos_listInput = {
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutPermissionComplexesInput = {
|
||||
@@ -652,6 +706,8 @@ export type ComplexCreateWithoutPermissionComplexesInput = {
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPermissionComplexesInput = {
|
||||
@@ -665,6 +721,8 @@ export type ComplexUncheckedCreateWithoutPermissionComplexesInput = {
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPermissionComplexesInput = {
|
||||
@@ -694,6 +752,8 @@ export type ComplexUpdateWithoutPermissionComplexesInput = {
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPermissionComplexesInput = {
|
||||
@@ -707,6 +767,160 @@ export type ComplexUncheckedUpdateWithoutPermissionComplexesInput = {
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutCustomerIndividualsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
address?: string | null
|
||||
tax_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutCustomerIndividualsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
address?: string | null
|
||||
tax_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutCustomerIndividualsInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutCustomerIndividualsInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutCustomerIndividualsInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomerIndividualsInput, Prisma.ComplexUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutCustomerIndividualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
tax_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutCustomerIndividualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
tax_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutCustomerLegalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
address?: string | null
|
||||
tax_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutCustomerLegalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
address?: string | null
|
||||
tax_id?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutCustomerLegalsInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedCreateWithoutCustomerLegalsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutCustomerLegalsInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedCreateWithoutCustomerLegalsInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutCustomerLegalsInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomerLegalsInput, Prisma.ComplexUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutCustomerLegalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
tax_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutCustomerLegalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
tax_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutGoodsInput = {
|
||||
@@ -720,6 +934,8 @@ export type ComplexCreateWithoutGoodsInput = {
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutGoodsInput = {
|
||||
@@ -733,6 +949,8 @@ export type ComplexUncheckedCreateWithoutGoodsInput = {
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutGoodsInput = {
|
||||
@@ -762,6 +980,8 @@ export type ComplexUpdateWithoutGoodsInput = {
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutGoodsInput = {
|
||||
@@ -775,6 +995,8 @@ export type ComplexUncheckedUpdateWithoutGoodsInput = {
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutGood_categoriesInput = {
|
||||
@@ -788,6 +1010,8 @@ export type ComplexCreateWithoutGood_categoriesInput = {
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
@@ -801,6 +1025,8 @@ export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutGood_categoriesInput = {
|
||||
@@ -830,6 +1056,8 @@ export type ComplexUpdateWithoutGood_categoriesInput = {
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
@@ -843,6 +1071,8 @@ export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyBusiness_activityInput = {
|
||||
@@ -865,6 +1095,8 @@ export type ComplexUpdateWithoutBusiness_activityInput = {
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
@@ -878,6 +1110,8 @@ export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permissionComplexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
@@ -899,6 +1133,8 @@ export type ComplexCountOutputType = {
|
||||
goods: number
|
||||
good_categories: number
|
||||
permissionComplexes: number
|
||||
customerIndividuals: number
|
||||
customerLegals: number
|
||||
}
|
||||
|
||||
export type ComplexCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -906,6 +1142,8 @@ export type ComplexCountOutputTypeSelect<ExtArgs extends runtime.Types.Extension
|
||||
goods?: boolean | ComplexCountOutputTypeCountGoodsArgs
|
||||
good_categories?: boolean | ComplexCountOutputTypeCountGood_categoriesArgs
|
||||
permissionComplexes?: boolean | ComplexCountOutputTypeCountPermissionComplexesArgs
|
||||
customerIndividuals?: boolean | ComplexCountOutputTypeCountCustomerIndividualsArgs
|
||||
customerLegals?: boolean | ComplexCountOutputTypeCountCustomerLegalsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -946,6 +1184,20 @@ export type ComplexCountOutputTypeCountPermissionComplexesArgs<ExtArgs extends r
|
||||
where?: Prisma.PermissionComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountCustomerIndividualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountCustomerLegalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -960,6 +1212,8 @@ export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
goods?: boolean | Prisma.Complex$goodsArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permissionComplexes?: boolean | Prisma.Complex$permissionComplexesArgs<ExtArgs>
|
||||
customerIndividuals?: boolean | Prisma.Complex$customerIndividualsArgs<ExtArgs>
|
||||
customerLegals?: boolean | Prisma.Complex$customerLegalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complex"]>
|
||||
|
||||
@@ -982,6 +1236,8 @@ export type ComplexInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
goods?: boolean | Prisma.Complex$goodsArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permissionComplexes?: boolean | Prisma.Complex$permissionComplexesArgs<ExtArgs>
|
||||
customerIndividuals?: boolean | Prisma.Complex$customerIndividualsArgs<ExtArgs>
|
||||
customerLegals?: boolean | Prisma.Complex$customerLegalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -993,6 +1249,8 @@ export type $ComplexPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
good_categories: Prisma.$GoodCategoryPayload<ExtArgs>[]
|
||||
permissionComplexes: Prisma.$PermissionComplexPayload<ExtArgs>[]
|
||||
customerIndividuals: Prisma.$CustomerIndividualPayload<ExtArgs>[]
|
||||
customerLegals: Prisma.$CustomerLegalPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1347,6 +1605,8 @@ export interface Prisma__ComplexClient<T, Null = never, ExtArgs extends runtime.
|
||||
goods<T extends Prisma.Complex$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
good_categories<T extends Prisma.Complex$good_categoriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$good_categoriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
permissionComplexes<T extends Prisma.Complex$permissionComplexesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$permissionComplexesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionComplexPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customerIndividuals<T extends Prisma.Complex$customerIndividualsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$customerIndividualsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customerLegals<T extends Prisma.Complex$customerLegalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$customerLegalsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1821,6 +2081,54 @@ export type Complex$permissionComplexesArgs<ExtArgs extends runtime.Types.Extens
|
||||
distinct?: Prisma.PermissionComplexScalarFieldEnum | Prisma.PermissionComplexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.customerIndividuals
|
||||
*/
|
||||
export type Complex$customerIndividualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerIndividual
|
||||
*/
|
||||
select?: Prisma.CustomerIndividualSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the CustomerIndividual
|
||||
*/
|
||||
omit?: Prisma.CustomerIndividualOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.CustomerIndividualInclude<ExtArgs> | null
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
orderBy?: Prisma.CustomerIndividualOrderByWithRelationInput | Prisma.CustomerIndividualOrderByWithRelationInput[]
|
||||
cursor?: Prisma.CustomerIndividualWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.CustomerIndividualScalarFieldEnum | Prisma.CustomerIndividualScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.customerLegals
|
||||
*/
|
||||
export type Complex$customerLegalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerLegal
|
||||
*/
|
||||
select?: Prisma.CustomerLegalSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the CustomerLegal
|
||||
*/
|
||||
omit?: Prisma.CustomerLegalOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.CustomerLegalInclude<ExtArgs> | null
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[]
|
||||
cursor?: Prisma.CustomerLegalWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex without action
|
||||
*/
|
||||
|
||||
@@ -193,6 +193,7 @@ export type ConsumerAccountWhereInput = {
|
||||
user?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
permissions?: Prisma.PermissionConsumerListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type ConsumerAccountOrderByWithRelationInput = {
|
||||
@@ -205,6 +206,7 @@ export type ConsumerAccountOrderByWithRelationInput = {
|
||||
user?: Prisma.ConsumerOrderByWithRelationInput
|
||||
account?: Prisma.AccountOrderByWithRelationInput
|
||||
permissions?: Prisma.PermissionConsumerOrderByRelationAggregateInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ConsumerAccountOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -221,6 +223,7 @@ export type ConsumerAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
user?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
permissions?: Prisma.PermissionConsumerListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "account_id">
|
||||
|
||||
export type ConsumerAccountOrderByWithAggregationInput = {
|
||||
@@ -255,6 +258,7 @@ export type ConsumerAccountCreateInput = {
|
||||
user: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
permissions?: Prisma.PermissionConsumerCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateInput = {
|
||||
@@ -265,6 +269,7 @@ export type ConsumerAccountUncheckedCreateInput = {
|
||||
user_id: string
|
||||
account_id: string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateInput = {
|
||||
@@ -275,6 +280,7 @@ export type ConsumerAccountUpdateInput = {
|
||||
user?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
permissions?: Prisma.PermissionConsumerUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateInput = {
|
||||
@@ -285,6 +291,7 @@ export type ConsumerAccountUncheckedUpdateInput = {
|
||||
user_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateManyInput = {
|
||||
@@ -457,6 +464,20 @@ export type ConsumerAccountUpdateOneRequiredWithoutPermissionsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPermissionsInput, Prisma.ConsumerAccountUpdateWithoutPermissionsInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionsInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSalesInvoicesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutSalesInvoicesInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSalesInvoicesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutSalesInvoicesInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutSalesInvoicesInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.ConsumerAccountUpdateWithoutSalesInvoicesInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
@@ -464,6 +485,7 @@ export type ConsumerAccountCreateWithoutAccountInput = {
|
||||
updated_at?: Date | string
|
||||
user: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
permissions?: Prisma.PermissionConsumerCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutAccountInput = {
|
||||
@@ -473,6 +495,7 @@ export type ConsumerAccountUncheckedCreateWithoutAccountInput = {
|
||||
updated_at?: Date | string
|
||||
user_id: string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutAccountInput = {
|
||||
@@ -498,6 +521,7 @@ export type ConsumerAccountUpdateWithoutAccountInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
permissions?: Prisma.PermissionConsumerUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
|
||||
@@ -507,6 +531,7 @@ export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutUserInput = {
|
||||
@@ -516,6 +541,7 @@ export type ConsumerAccountCreateWithoutUserInput = {
|
||||
updated_at?: Date | string
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
permissions?: Prisma.PermissionConsumerCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutUserInput = {
|
||||
@@ -525,6 +551,7 @@ export type ConsumerAccountUncheckedCreateWithoutUserInput = {
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedCreateNestedManyWithoutAccountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutUserInput = {
|
||||
@@ -572,6 +599,7 @@ export type ConsumerAccountCreateWithoutPermissionsInput = {
|
||||
updated_at?: Date | string
|
||||
user: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutPermissionsInput = {
|
||||
@@ -581,6 +609,7 @@ export type ConsumerAccountUncheckedCreateWithoutPermissionsInput = {
|
||||
updated_at?: Date | string
|
||||
user_id: string
|
||||
account_id: string
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutPermissionsInput = {
|
||||
@@ -606,6 +635,7 @@ export type ConsumerAccountUpdateWithoutPermissionsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutPermissionsInput = {
|
||||
@@ -615,6 +645,63 @@ export type ConsumerAccountUncheckedUpdateWithoutPermissionsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutSalesInvoicesInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
user: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
permissions?: Prisma.PermissionConsumerCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutSalesInvoicesInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
user_id: string
|
||||
account_id: string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedCreateNestedManyWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutSalesInvoicesInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutSalesInvoicesInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSalesInvoicesInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutSalesInvoicesInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutSalesInvoicesInput, Prisma.ConsumerAccountUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutSalesInvoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
permissions?: Prisma.PermissionConsumerUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutSalesInvoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateManyUserInput = {
|
||||
@@ -632,6 +719,7 @@ export type ConsumerAccountUpdateWithoutUserInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
permissions?: Prisma.PermissionConsumerUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutUserInput = {
|
||||
@@ -641,6 +729,7 @@ export type ConsumerAccountUncheckedUpdateWithoutUserInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
permissions?: Prisma.PermissionConsumerUncheckedUpdateManyWithoutAccountNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateManyWithoutUserInput = {
|
||||
@@ -658,10 +747,12 @@ export type ConsumerAccountUncheckedUpdateManyWithoutUserInput = {
|
||||
|
||||
export type ConsumerAccountCountOutputType = {
|
||||
permissions: number
|
||||
salesInvoices: number
|
||||
}
|
||||
|
||||
export type ConsumerAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
permissions?: boolean | ConsumerAccountCountOutputTypeCountPermissionsArgs
|
||||
salesInvoices?: boolean | ConsumerAccountCountOutputTypeCountSalesInvoicesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -681,6 +772,13 @@ export type ConsumerAccountCountOutputTypeCountPermissionsArgs<ExtArgs extends r
|
||||
where?: Prisma.PermissionConsumerWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccountCountOutputType without action
|
||||
*/
|
||||
export type ConsumerAccountCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ConsumerAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -692,6 +790,7 @@ export type ConsumerAccountSelect<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
user?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
permissions?: boolean | Prisma.ConsumerAccount$permissionsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.ConsumerAccount$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["consumerAccount"]>
|
||||
|
||||
@@ -711,6 +810,7 @@ export type ConsumerAccountInclude<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
user?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
permissions?: boolean | Prisma.ConsumerAccount$permissionsArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.ConsumerAccount$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -720,6 +820,7 @@ export type $ConsumerAccountPayload<ExtArgs extends runtime.Types.Extensions.Int
|
||||
user: Prisma.$ConsumerPayload<ExtArgs>
|
||||
account: Prisma.$AccountPayload<ExtArgs>
|
||||
permissions: Prisma.$PermissionConsumerPayload<ExtArgs>[]
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1071,6 +1172,7 @@ export interface Prisma__ConsumerAccountClient<T, Null = never, ExtArgs extends
|
||||
user<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
permissions<T extends Prisma.ConsumerAccount$permissionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$permissionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionConsumerPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
salesInvoices<T extends Prisma.ConsumerAccount$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1472,6 +1574,30 @@ export type ConsumerAccount$permissionsArgs<ExtArgs extends runtime.Types.Extens
|
||||
distinct?: Prisma.PermissionConsumerScalarFieldEnum | Prisma.PermissionConsumerScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.salesInvoices
|
||||
*/
|
||||
export type ConsumerAccount$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the SalesInvoice
|
||||
*/
|
||||
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the SalesInvoice
|
||||
*/
|
||||
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
|
||||
cursor?: Prisma.SalesInvoiceWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount without action
|
||||
*/
|
||||
|
||||
@@ -26,64 +26,58 @@ export type AggregateCustomer = {
|
||||
|
||||
export type CustomerMinAggregateOutputType = {
|
||||
id: string | null
|
||||
type: $Enums.CustomerType | null
|
||||
is_favorite: boolean | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType | null
|
||||
complex_id: string | null
|
||||
is_favorite: boolean | null
|
||||
}
|
||||
|
||||
export type CustomerMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
type: $Enums.CustomerType | null
|
||||
is_favorite: boolean | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType | null
|
||||
complex_id: string | null
|
||||
is_favorite: boolean | null
|
||||
}
|
||||
|
||||
export type CustomerCountAggregateOutputType = {
|
||||
id: number
|
||||
type: number
|
||||
is_favorite: number
|
||||
created_at: number
|
||||
updated_at: number
|
||||
deleted_at: number
|
||||
type: number
|
||||
complex_id: number
|
||||
is_favorite: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
|
||||
export type CustomerMinAggregateInputType = {
|
||||
id?: true
|
||||
type?: true
|
||||
is_favorite?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
complex_id?: true
|
||||
is_favorite?: true
|
||||
}
|
||||
|
||||
export type CustomerMaxAggregateInputType = {
|
||||
id?: true
|
||||
type?: true
|
||||
is_favorite?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
complex_id?: true
|
||||
is_favorite?: true
|
||||
}
|
||||
|
||||
export type CustomerCountAggregateInputType = {
|
||||
id?: true
|
||||
type?: true
|
||||
is_favorite?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
complex_id?: true
|
||||
is_favorite?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -161,12 +155,11 @@ export type CustomerGroupByArgs<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
|
||||
export type CustomerGroupByOutputType = {
|
||||
id: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite: boolean | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite: boolean | null
|
||||
_count: CustomerCountAggregateOutputType | null
|
||||
_min: CustomerMinAggregateOutputType | null
|
||||
_max: CustomerMaxAggregateOutputType | null
|
||||
@@ -192,28 +185,26 @@ export type CustomerWhereInput = {
|
||||
OR?: Prisma.CustomerWhereInput[]
|
||||
NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[]
|
||||
id?: Prisma.StringFilter<"Customer"> | string
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
created_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFilter<"Customer"> | string
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
customerIndividuals?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customerLegals?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
customer_individuals?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customer_legals?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
}
|
||||
|
||||
export type CustomerOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualOrderByWithRelationInput
|
||||
customerLegals?: Prisma.CustomerLegalOrderByWithRelationInput
|
||||
customer_individuals?: Prisma.CustomerIndividualOrderByWithRelationInput
|
||||
customer_legals?: Prisma.CustomerLegalOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -222,25 +213,23 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{
|
||||
AND?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[]
|
||||
OR?: Prisma.CustomerWhereInput[]
|
||||
NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[]
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
created_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFilter<"Customer"> | string
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
customerIndividuals?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customerLegals?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
customer_individuals?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customer_legals?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
export type CustomerOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.CustomerCountOrderByAggregateInput
|
||||
_max?: Prisma.CustomerMaxOrderByAggregateInput
|
||||
_min?: Prisma.CustomerMinOrderByAggregateInput
|
||||
@@ -251,94 +240,86 @@ export type CustomerScalarWhereWithAggregatesInput = {
|
||||
OR?: Prisma.CustomerScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.CustomerScalarWhereWithAggregatesInput | Prisma.CustomerScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.StringWithAggregatesFilter<"Customer"> | string
|
||||
type?: Prisma.EnumCustomerTypeWithAggregatesFilter<"Customer"> | $Enums.CustomerType
|
||||
is_favorite?: Prisma.BoolNullableWithAggregatesFilter<"Customer"> | boolean | null
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeWithAggregatesFilter<"Customer"> | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringWithAggregatesFilter<"Customer"> | string
|
||||
is_favorite?: Prisma.BoolNullableWithAggregatesFilter<"Customer"> | boolean | null
|
||||
}
|
||||
|
||||
export type CustomerCreateInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateManyInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
}
|
||||
|
||||
export type CustomerUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
}
|
||||
|
||||
export type CustomerOrderByRelevanceInput = {
|
||||
@@ -349,32 +330,29 @@ export type CustomerOrderByRelevanceInput = {
|
||||
|
||||
export type CustomerCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerScalarRelationFilter = {
|
||||
@@ -387,10 +365,6 @@ export type CustomerNullableScalarRelationFilter = {
|
||||
isNot?: Prisma.CustomerWhereInput | null
|
||||
}
|
||||
|
||||
export type NullableDateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string | null
|
||||
}
|
||||
|
||||
export type EnumCustomerTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.CustomerType
|
||||
}
|
||||
@@ -399,32 +373,36 @@ export type NullableBoolFieldUpdateOperationsInput = {
|
||||
set?: boolean | null
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutCustomerIndividualsInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomerIndividualsInput
|
||||
export type NullableDateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string | null
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutCustomer_individualsInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_individualsInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateOneRequiredWithoutCustomerIndividualsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomerIndividualsInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomerIndividualsInput
|
||||
export type CustomerUpdateOneRequiredWithoutCustomer_individualsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_individualsInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomer_individualsInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomerIndividualsInput, Prisma.CustomerUpdateWithoutCustomerIndividualsInput>, Prisma.CustomerUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomer_individualsInput, Prisma.CustomerUpdateWithoutCustomer_individualsInput>, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutCustomerLegalsInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedCreateWithoutCustomerLegalsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomerLegalsInput
|
||||
export type CustomerCreateNestedOneWithoutCustomer_legalsInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_legalsInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateOneRequiredWithoutCustomerLegalsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedCreateWithoutCustomerLegalsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomerLegalsInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomerLegalsInput
|
||||
export type CustomerUpdateOneRequiredWithoutCustomer_legalsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalsInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_legalsInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomer_legalsInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomerLegalsInput, Prisma.CustomerUpdateWithoutCustomerLegalsInput>, Prisma.CustomerUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomer_legalsInput, Prisma.CustomerUpdateWithoutCustomer_legalsInput>, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutSales_invoicesInput = {
|
||||
@@ -443,156 +421,146 @@ export type CustomerUpdateOneWithoutSales_invoicesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutSales_invoicesInput, Prisma.CustomerUpdateWithoutSales_invoicesInput>, Prisma.CustomerUncheckedUpdateWithoutSales_invoicesInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutCustomerIndividualsInput = {
|
||||
export type CustomerCreateWithoutCustomer_individualsInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutCustomerIndividualsInput = {
|
||||
export type CustomerUncheckedCreateWithoutCustomer_individualsInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutCustomerIndividualsInput = {
|
||||
export type CustomerCreateOrConnectWithoutCustomer_individualsInput = {
|
||||
where: Prisma.CustomerWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type CustomerUpsertWithoutCustomerIndividualsInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedCreateWithoutCustomerIndividualsInput>
|
||||
export type CustomerUpsertWithoutCustomer_individualsInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualsInput>
|
||||
where?: Prisma.CustomerWhereInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomerIndividualsInput = {
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomer_individualsInput = {
|
||||
where?: Prisma.CustomerWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomerIndividualsInput, Prisma.CustomerUncheckedUpdateWithoutCustomerIndividualsInput>
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_individualsInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type CustomerUpdateWithoutCustomerIndividualsInput = {
|
||||
export type CustomerUpdateWithoutCustomer_individualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutCustomerIndividualsInput = {
|
||||
export type CustomerUncheckedUpdateWithoutCustomer_individualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutCustomerLegalsInput = {
|
||||
export type CustomerCreateWithoutCustomer_legalsInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutCustomerLegalsInput = {
|
||||
export type CustomerUncheckedCreateWithoutCustomer_legalsInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutCustomerLegalsInput = {
|
||||
export type CustomerCreateOrConnectWithoutCustomer_legalsInput = {
|
||||
where: Prisma.CustomerWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedCreateWithoutCustomerLegalsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type CustomerUpsertWithoutCustomerLegalsInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedCreateWithoutCustomerLegalsInput>
|
||||
export type CustomerUpsertWithoutCustomer_legalsInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalsInput>
|
||||
where?: Prisma.CustomerWhereInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomerLegalsInput = {
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomer_legalsInput = {
|
||||
where?: Prisma.CustomerWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomerLegalsInput, Prisma.CustomerUncheckedUpdateWithoutCustomerLegalsInput>
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_legalsInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type CustomerUpdateWithoutCustomerLegalsInput = {
|
||||
export type CustomerUpdateWithoutCustomer_legalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutCustomerLegalsInput = {
|
||||
export type CustomerUncheckedUpdateWithoutCustomer_legalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutSales_invoicesInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
customerIndividuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutSales_invoicesInput = {
|
||||
id?: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite?: boolean | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite?: boolean | null
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutSales_invoicesInput = {
|
||||
@@ -613,26 +581,24 @@ export type CustomerUpdateToOneWithWhereWithoutSales_invoicesInput = {
|
||||
|
||||
export type CustomerUpdateWithoutSales_invoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
customerIndividuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutSales_invoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
customerIndividuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customerLegals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -668,15 +634,14 @@ export type CustomerCountOutputTypeCountSales_invoicesArgs<ExtArgs extends runti
|
||||
|
||||
export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
type?: boolean
|
||||
is_favorite?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
type?: boolean
|
||||
complex_id?: boolean
|
||||
is_favorite?: boolean
|
||||
sales_invoices?: boolean | Prisma.Customer$sales_invoicesArgs<ExtArgs>
|
||||
customerIndividuals?: boolean | Prisma.Customer$customerIndividualsArgs<ExtArgs>
|
||||
customerLegals?: boolean | Prisma.Customer$customerLegalsArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.Customer$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.Customer$customer_legalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customer"]>
|
||||
|
||||
@@ -684,19 +649,18 @@ export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
|
||||
export type CustomerSelectScalar = {
|
||||
id?: boolean
|
||||
type?: boolean
|
||||
is_favorite?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
type?: boolean
|
||||
complex_id?: boolean
|
||||
is_favorite?: boolean
|
||||
}
|
||||
|
||||
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "created_at" | "updated_at" | "deleted_at" | "type" | "complex_id" | "is_favorite", ExtArgs["result"]["customer"]>
|
||||
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "is_favorite" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["customer"]>
|
||||
export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
sales_invoices?: boolean | Prisma.Customer$sales_invoicesArgs<ExtArgs>
|
||||
customerIndividuals?: boolean | Prisma.Customer$customerIndividualsArgs<ExtArgs>
|
||||
customerLegals?: boolean | Prisma.Customer$customerLegalsArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.Customer$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.Customer$customer_legalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -704,17 +668,16 @@ export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
name: "Customer"
|
||||
objects: {
|
||||
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
customerIndividuals: Prisma.$CustomerIndividualPayload<ExtArgs> | null
|
||||
customerLegals: Prisma.$CustomerLegalPayload<ExtArgs> | null
|
||||
customer_individuals: Prisma.$CustomerIndividualPayload<ExtArgs> | null
|
||||
customer_legals: Prisma.$CustomerLegalPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
type: $Enums.CustomerType
|
||||
is_favorite: boolean | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType
|
||||
complex_id: string
|
||||
is_favorite: boolean | null
|
||||
}, ExtArgs["result"]["customer"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1056,8 +1019,8 @@ readonly fields: CustomerFieldRefs;
|
||||
export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
sales_invoices<T extends Prisma.Customer$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$sales_invoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customerIndividuals<T extends Prisma.Customer$customerIndividualsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customerIndividualsArgs<ExtArgs>>): Prisma.Prisma__CustomerIndividualClient<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
customerLegals<T extends Prisma.Customer$customerLegalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customerLegalsArgs<ExtArgs>>): Prisma.Prisma__CustomerLegalClient<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
customer_individuals<T extends Prisma.Customer$customer_individualsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customer_individualsArgs<ExtArgs>>): Prisma.Prisma__CustomerIndividualClient<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
customer_legals<T extends Prisma.Customer$customer_legalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customer_legalsArgs<ExtArgs>>): Prisma.Prisma__CustomerLegalClient<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<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.
|
||||
@@ -1088,12 +1051,11 @@ export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime
|
||||
*/
|
||||
export interface CustomerFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"Customer", 'String'>
|
||||
readonly type: Prisma.FieldRef<"Customer", 'CustomerType'>
|
||||
readonly is_favorite: Prisma.FieldRef<"Customer", 'Boolean'>
|
||||
readonly created_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly updated_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly deleted_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly type: Prisma.FieldRef<"Customer", 'CustomerType'>
|
||||
readonly complex_id: Prisma.FieldRef<"Customer", 'String'>
|
||||
readonly is_favorite: Prisma.FieldRef<"Customer", 'Boolean'>
|
||||
}
|
||||
|
||||
|
||||
@@ -1461,9 +1423,9 @@ export type Customer$sales_invoicesArgs<ExtArgs extends runtime.Types.Extensions
|
||||
}
|
||||
|
||||
/**
|
||||
* Customer.customerIndividuals
|
||||
* Customer.customer_individuals
|
||||
*/
|
||||
export type Customer$customerIndividualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Customer$customer_individualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerIndividual
|
||||
*/
|
||||
@@ -1480,9 +1442,9 @@ export type Customer$customerIndividualsArgs<ExtArgs extends runtime.Types.Exten
|
||||
}
|
||||
|
||||
/**
|
||||
* Customer.customerLegals
|
||||
* Customer.customer_legals
|
||||
*/
|
||||
export type Customer$customerLegalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Customer$customer_legalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerLegal
|
||||
*/
|
||||
|
||||
@@ -199,6 +199,7 @@ export type CustomerIndividualWhereInput = {
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualOrderByWithRelationInput = {
|
||||
@@ -210,6 +211,7 @@ export type CustomerIndividualOrderByWithRelationInput = {
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerIndividualOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -226,6 +228,7 @@ export type CustomerIndividualWhereUniqueInput = Prisma.AtLeast<{
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}, "customer_id" | "complex_id_national_id">
|
||||
|
||||
export type CustomerIndividualOrderByWithAggregationInput = {
|
||||
@@ -260,8 +263,8 @@ export type CustomerIndividualCreateInput = {
|
||||
national_id: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
complex_id: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomerIndividualsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_individualsInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomerIndividualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateInput = {
|
||||
@@ -280,8 +283,8 @@ export type CustomerIndividualUpdateInput = {
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomerIndividualsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomerIndividualsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateInput = {
|
||||
@@ -310,7 +313,6 @@ export type CustomerIndividualUpdateManyMutationInput = {
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateManyInput = {
|
||||
@@ -323,6 +325,16 @@ export type CustomerIndividualUncheckedUpdateManyInput = {
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualListRelationFilter = {
|
||||
every?: Prisma.CustomerIndividualWhereInput
|
||||
some?: Prisma.CustomerIndividualWhereInput
|
||||
none?: Prisma.CustomerIndividualWhereInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerIndividualNullableScalarRelationFilter = {
|
||||
is?: Prisma.CustomerIndividualWhereInput | null
|
||||
isNot?: Prisma.CustomerIndividualWhereInput | null
|
||||
@@ -369,6 +381,48 @@ export type CustomerIndividualMinOrderByAggregateInput = {
|
||||
complex_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
set?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
set?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateNestedOneWithoutCustomerInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutCustomerInput, Prisma.CustomerIndividualUncheckedCreateWithoutCustomerInput>
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutCustomerInput
|
||||
@@ -401,13 +455,70 @@ export type CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerIndividualUpdateWithoutCustomerInput>, Prisma.CustomerIndividualUncheckedUpdateWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutComplexInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_individualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutComplexInput = {
|
||||
customer_id: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateOrConnectWithoutComplexInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyComplexInputEnvelope = {
|
||||
data: Prisma.CustomerIndividualCreateManyComplexInput | Prisma.CustomerIndividualCreateManyComplexInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutComplexInput, Prisma.CustomerIndividualUncheckedUpdateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutComplexInput, Prisma.CustomerIndividualUncheckedUpdateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateManyWithWhereWithoutComplexInput = {
|
||||
where: Prisma.CustomerIndividualScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateManyMutationInput, Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualScalarWhereInput = {
|
||||
AND?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
OR?: Prisma.CustomerIndividualScalarWhereInput[]
|
||||
NOT?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
customer_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
first_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
last_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
national_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
postal_code?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutCustomerInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
complex_id: string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomerIndividualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutCustomerInput = {
|
||||
@@ -441,7 +552,7 @@ export type CustomerIndividualUpdateWithoutCustomerInput = {
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomerIndividualsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateWithoutCustomerInput = {
|
||||
@@ -453,6 +564,42 @@ export type CustomerIndividualUncheckedUpdateWithoutCustomerInput = {
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyComplexInput = {
|
||||
customer_id: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateWithoutComplexInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateWithoutComplexInput = {
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutComplexInput = {
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
|
||||
|
||||
export type CustomerIndividualSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -464,6 +611,7 @@ export type CustomerIndividualSelect<ExtArgs extends runtime.Types.Extensions.In
|
||||
economic_code?: boolean
|
||||
complex_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerIndividual"]>
|
||||
|
||||
|
||||
@@ -481,12 +629,14 @@ export type CustomerIndividualSelectScalar = {
|
||||
export type CustomerIndividualOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"customer_id" | "first_name" | "last_name" | "national_id" | "postal_code" | "economic_code" | "complex_id", ExtArgs["result"]["customerIndividual"]>
|
||||
export type CustomerIndividualInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerIndividualPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerIndividual"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
complex: Prisma.$ComplexPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
customer_id: string
|
||||
@@ -837,6 +987,7 @@ readonly fields: CustomerIndividualFieldRefs;
|
||||
export interface Prisma__CustomerIndividualClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer<T extends Prisma.CustomerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.CustomerDefaultArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.ComplexDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ComplexDefaultArgs<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.
|
||||
|
||||
@@ -191,6 +191,7 @@ export type CustomerLegalWhereInput = {
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalOrderByWithRelationInput = {
|
||||
@@ -201,6 +202,7 @@ export type CustomerLegalOrderByWithRelationInput = {
|
||||
postal_code?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerLegalOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -216,6 +218,7 @@ export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}, "customer_id" | "complex_id_registration_number">
|
||||
|
||||
export type CustomerLegalOrderByWithAggregationInput = {
|
||||
@@ -247,8 +250,8 @@ export type CustomerLegalCreateInput = {
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
postal_code: string
|
||||
complex_id: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomerLegalsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_legalsInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomerLegalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateInput = {
|
||||
@@ -265,8 +268,8 @@ export type CustomerLegalUpdateInput = {
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomerLegalsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomerLegalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateInput = {
|
||||
@@ -292,7 +295,6 @@ export type CustomerLegalUpdateManyMutationInput = {
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyInput = {
|
||||
@@ -304,6 +306,16 @@ export type CustomerLegalUncheckedUpdateManyInput = {
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalListRelationFilter = {
|
||||
every?: Prisma.CustomerLegalWhereInput
|
||||
some?: Prisma.CustomerLegalWhereInput
|
||||
none?: Prisma.CustomerLegalWhereInput
|
||||
}
|
||||
|
||||
export type CustomerLegalOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerLegalNullableScalarRelationFilter = {
|
||||
is?: Prisma.CustomerLegalWhereInput | null
|
||||
isNot?: Prisma.CustomerLegalWhereInput | null
|
||||
@@ -347,6 +359,48 @@ export type CustomerLegalMinOrderByAggregateInput = {
|
||||
complex_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput[]
|
||||
deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateNestedOneWithoutCustomerInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutCustomerInput, Prisma.CustomerLegalUncheckedCreateWithoutCustomerInput>
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutCustomerInput
|
||||
@@ -379,12 +433,66 @@ export type CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerLegalUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerLegalUpdateWithoutCustomerInput>, Prisma.CustomerLegalUncheckedUpdateWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutComplexInput = {
|
||||
company_name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
postal_code: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_legalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutComplexInput = {
|
||||
customer_id: string
|
||||
company_name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
postal_code: string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateOrConnectWithoutComplexInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyComplexInputEnvelope = {
|
||||
data: Prisma.CustomerLegalCreateManyComplexInput | Prisma.CustomerLegalCreateManyComplexInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type CustomerLegalUpsertWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutComplexInput, Prisma.CustomerLegalUncheckedUpdateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithWhereUniqueWithoutComplexInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutComplexInput, Prisma.CustomerLegalUncheckedUpdateWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyWithWhereWithoutComplexInput = {
|
||||
where: Prisma.CustomerLegalScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateManyMutationInput, Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalScalarWhereInput = {
|
||||
AND?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
OR?: Prisma.CustomerLegalScalarWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
customer_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
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
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutCustomerInput = {
|
||||
company_name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
postal_code: string
|
||||
complex_id: string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomerLegalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutCustomerInput = {
|
||||
@@ -416,7 +524,7 @@ export type CustomerLegalUpdateWithoutCustomerInput = {
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomerLegalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutCustomerInput = {
|
||||
@@ -427,6 +535,38 @@ export type CustomerLegalUncheckedUpdateWithoutCustomerInput = {
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyComplexInput = {
|
||||
customer_id: string
|
||||
company_name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
postal_code: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithoutComplexInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutComplexInput = {
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutComplexInput = {
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
|
||||
|
||||
export type CustomerLegalSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -437,6 +577,7 @@ export type CustomerLegalSelect<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
postal_code?: boolean
|
||||
complex_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerLegal"]>
|
||||
|
||||
|
||||
@@ -453,12 +594,14 @@ export type CustomerLegalSelectScalar = {
|
||||
export type CustomerLegalOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"customer_id" | "company_name" | "economic_code" | "registration_number" | "postal_code" | "complex_id", ExtArgs["result"]["customerLegal"]>
|
||||
export type CustomerLegalInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerLegalPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerLegal"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
complex: Prisma.$ComplexPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
customer_id: string
|
||||
@@ -808,6 +951,7 @@ readonly fields: CustomerLegalFieldRefs;
|
||||
export interface Prisma__CustomerLegalClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer<T extends Prisma.CustomerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.CustomerDefaultArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.ComplexDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ComplexDefaultArgs<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.
|
||||
|
||||
@@ -235,6 +235,7 @@ export type PosWhereInput = {
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
licenses?: Prisma.LicenseListRelationFilter
|
||||
permissionPos?: Prisma.PermissionPosListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type PosOrderByWithRelationInput = {
|
||||
@@ -254,6 +255,7 @@ export type PosOrderByWithRelationInput = {
|
||||
provider?: Prisma.ProviderOrderByWithRelationInput
|
||||
licenses?: Prisma.LicenseOrderByRelationAggregateInput
|
||||
permissionPos?: Prisma.PermissionPosOrderByRelationAggregateInput
|
||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.PosOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -277,6 +279,7 @@ export type PosWhereUniqueInput = Prisma.AtLeast<{
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
licenses?: Prisma.LicenseListRelationFilter
|
||||
permissionPos?: Prisma.PermissionPosListRelationFilter
|
||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "serial">
|
||||
|
||||
export type PosOrderByWithAggregationInput = {
|
||||
@@ -327,6 +330,7 @@ export type PosCreateInput = {
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateInput = {
|
||||
@@ -343,6 +347,7 @@ export type PosUncheckedCreateInput = {
|
||||
provider_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUpdateInput = {
|
||||
@@ -359,6 +364,7 @@ export type PosUpdateInput = {
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateInput = {
|
||||
@@ -375,6 +381,7 @@ export type PosUncheckedUpdateInput = {
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosCreateManyInput = {
|
||||
@@ -641,6 +648,20 @@ export type PosUncheckedUpdateManyWithoutProviderNestedInput = {
|
||||
deleteMany?: Prisma.PosScalarWhereInput | Prisma.PosScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type PosCreateNestedOneWithoutSalesInvoicesInput = {
|
||||
create?: Prisma.XOR<Prisma.PosCreateWithoutSalesInvoicesInput, Prisma.PosUncheckedCreateWithoutSalesInvoicesInput>
|
||||
connectOrCreate?: Prisma.PosCreateOrConnectWithoutSalesInvoicesInput
|
||||
connect?: Prisma.PosWhereUniqueInput
|
||||
}
|
||||
|
||||
export type PosUpdateOneRequiredWithoutSalesInvoicesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.PosCreateWithoutSalesInvoicesInput, Prisma.PosUncheckedCreateWithoutSalesInvoicesInput>
|
||||
connectOrCreate?: Prisma.PosCreateOrConnectWithoutSalesInvoicesInput
|
||||
upsert?: Prisma.PosUpsertWithoutSalesInvoicesInput
|
||||
connect?: Prisma.PosWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.PosUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.PosUpdateWithoutSalesInvoicesInput>, Prisma.PosUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type PosCreateWithoutComplexInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -654,6 +675,7 @@ export type PosCreateWithoutComplexInput = {
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutComplexInput = {
|
||||
@@ -669,6 +691,7 @@ export type PosUncheckedCreateWithoutComplexInput = {
|
||||
provider_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutComplexInput = {
|
||||
@@ -727,6 +750,7 @@ export type PosCreateWithoutDeviceInput = {
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutDeviceInput = {
|
||||
@@ -742,6 +766,7 @@ export type PosUncheckedCreateWithoutDeviceInput = {
|
||||
provider_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutDeviceInput = {
|
||||
@@ -783,6 +808,7 @@ export type PosCreateWithoutLicensesInput = {
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutLicensesInput = {
|
||||
@@ -798,6 +824,7 @@ export type PosUncheckedCreateWithoutLicensesInput = {
|
||||
device_id?: string | null
|
||||
provider_id?: string | null
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutLicensesInput = {
|
||||
@@ -829,6 +856,7 @@ export type PosUpdateWithoutLicensesInput = {
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutLicensesInput = {
|
||||
@@ -844,6 +872,7 @@ export type PosUncheckedUpdateWithoutLicensesInput = {
|
||||
device_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosCreateWithoutPermissionPosInput = {
|
||||
@@ -859,6 +888,7 @@ export type PosCreateWithoutPermissionPosInput = {
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutPermissionPosInput = {
|
||||
@@ -874,6 +904,7 @@ export type PosUncheckedCreateWithoutPermissionPosInput = {
|
||||
device_id?: string | null
|
||||
provider_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutPermissionPosInput = {
|
||||
@@ -905,6 +936,7 @@ export type PosUpdateWithoutPermissionPosInput = {
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutPermissionPosInput = {
|
||||
@@ -920,6 +952,7 @@ export type PosUncheckedUpdateWithoutPermissionPosInput = {
|
||||
device_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosCreateWithoutProviderInput = {
|
||||
@@ -935,6 +968,7 @@ export type PosCreateWithoutProviderInput = {
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutProviderInput = {
|
||||
@@ -950,6 +984,7 @@ export type PosUncheckedCreateWithoutProviderInput = {
|
||||
device_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutProviderInput = {
|
||||
@@ -978,6 +1013,86 @@ export type PosUpdateManyWithWhereWithoutProviderInput = {
|
||||
data: Prisma.XOR<Prisma.PosUpdateManyMutationInput, Prisma.PosUncheckedUpdateManyWithoutProviderInput>
|
||||
}
|
||||
|
||||
export type PosCreateWithoutSalesInvoicesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
serial: string
|
||||
model?: string | null
|
||||
status?: $Enums.POSStatus
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
licenses?: Prisma.LicenseCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutSalesInvoicesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
serial: string
|
||||
model?: string | null
|
||||
status?: $Enums.POSStatus
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
complex_id: string
|
||||
device_id?: string | null
|
||||
provider_id?: string | null
|
||||
licenses?: Prisma.LicenseUncheckedCreateNestedManyWithoutPosInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosCreateOrConnectWithoutSalesInvoicesInput = {
|
||||
where: Prisma.PosWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.PosCreateWithoutSalesInvoicesInput, Prisma.PosUncheckedCreateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type PosUpsertWithoutSalesInvoicesInput = {
|
||||
update: Prisma.XOR<Prisma.PosUpdateWithoutSalesInvoicesInput, Prisma.PosUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
create: Prisma.XOR<Prisma.PosCreateWithoutSalesInvoicesInput, Prisma.PosUncheckedCreateWithoutSalesInvoicesInput>
|
||||
where?: Prisma.PosWhereInput
|
||||
}
|
||||
|
||||
export type PosUpdateToOneWithWhereWithoutSalesInvoicesInput = {
|
||||
where?: Prisma.PosWhereInput
|
||||
data: Prisma.XOR<Prisma.PosUpdateWithoutSalesInvoicesInput, Prisma.PosUncheckedUpdateWithoutSalesInvoicesInput>
|
||||
}
|
||||
|
||||
export type PosUpdateWithoutSalesInvoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
serial?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
status?: Prisma.EnumPOSStatusFieldUpdateOperationsInput | $Enums.POSStatus
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutSalesInvoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
serial?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
status?: Prisma.EnumPOSStatusFieldUpdateOperationsInput | $Enums.POSStatus
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
device_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosCreateManyComplexInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -1004,6 +1119,7 @@ export type PosUpdateWithoutComplexInput = {
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutComplexInput = {
|
||||
@@ -1019,6 +1135,7 @@ export type PosUncheckedUpdateWithoutComplexInput = {
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateManyWithoutComplexInput = {
|
||||
@@ -1060,6 +1177,7 @@ export type PosUpdateWithoutDeviceInput = {
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutDeviceInput = {
|
||||
@@ -1075,6 +1193,7 @@ export type PosUncheckedUpdateWithoutDeviceInput = {
|
||||
provider_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateManyWithoutDeviceInput = {
|
||||
@@ -1116,6 +1235,7 @@ export type PosUpdateWithoutProviderInput = {
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
licenses?: Prisma.LicenseUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutProviderInput = {
|
||||
@@ -1131,6 +1251,7 @@ export type PosUncheckedUpdateWithoutProviderInput = {
|
||||
device_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
licenses?: Prisma.LicenseUncheckedUpdateManyWithoutPosNestedInput
|
||||
permissionPos?: Prisma.PermissionPosUncheckedUpdateManyWithoutPosNestedInput
|
||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateManyWithoutProviderInput = {
|
||||
@@ -1154,11 +1275,13 @@ export type PosUncheckedUpdateManyWithoutProviderInput = {
|
||||
export type PosCountOutputType = {
|
||||
licenses: number
|
||||
permissionPos: number
|
||||
salesInvoices: number
|
||||
}
|
||||
|
||||
export type PosCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
licenses?: boolean | PosCountOutputTypeCountLicensesArgs
|
||||
permissionPos?: boolean | PosCountOutputTypeCountPermissionPosArgs
|
||||
salesInvoices?: boolean | PosCountOutputTypeCountSalesInvoicesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1185,6 +1308,13 @@ export type PosCountOutputTypeCountPermissionPosArgs<ExtArgs extends runtime.Typ
|
||||
where?: Prisma.PermissionPosWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* PosCountOutputType without action
|
||||
*/
|
||||
export type PosCountOutputTypeCountSalesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type PosSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -1203,6 +1333,7 @@ export type PosSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = ru
|
||||
provider?: boolean | Prisma.Pos$providerArgs<ExtArgs>
|
||||
licenses?: boolean | Prisma.Pos$licensesArgs<ExtArgs>
|
||||
permissionPos?: boolean | Prisma.Pos$permissionPosArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Pos$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.PosCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["pos"]>
|
||||
|
||||
@@ -1229,6 +1360,7 @@ export type PosInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
provider?: boolean | Prisma.Pos$providerArgs<ExtArgs>
|
||||
licenses?: boolean | Prisma.Pos$licensesArgs<ExtArgs>
|
||||
permissionPos?: boolean | Prisma.Pos$permissionPosArgs<ExtArgs>
|
||||
salesInvoices?: boolean | Prisma.Pos$salesInvoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.PosCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -1240,6 +1372,7 @@ export type $PosPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
provider: Prisma.$ProviderPayload<ExtArgs> | null
|
||||
licenses: Prisma.$LicensePayload<ExtArgs>[]
|
||||
permissionPos: Prisma.$PermissionPosPayload<ExtArgs>[]
|
||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1598,6 +1731,7 @@ export interface Prisma__PosClient<T, Null = never, ExtArgs extends runtime.Type
|
||||
provider<T extends Prisma.Pos$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
licenses<T extends Prisma.Pos$licensesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$licensesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicensePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
permissionPos<T extends Prisma.Pos$permissionPosArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$permissionPosArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPosPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
salesInvoices<T extends Prisma.Pos$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -2066,6 +2200,30 @@ export type Pos$permissionPosArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
distinct?: Prisma.PermissionPosScalarFieldEnum | Prisma.PermissionPosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos.salesInvoices
|
||||
*/
|
||||
export type Pos$salesInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the SalesInvoice
|
||||
*/
|
||||
select?: Prisma.SalesInvoiceSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the SalesInvoice
|
||||
*/
|
||||
omit?: Prisma.SalesInvoiceOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.SalesInvoiceInclude<ExtArgs> | null
|
||||
where?: Prisma.SalesInvoiceWhereInput
|
||||
orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[]
|
||||
cursor?: Prisma.SalesInvoiceWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos without action
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ export type SalesInvoiceMinAggregateOutputType = {
|
||||
updated_at: Date | null
|
||||
customer_id: string | null
|
||||
account_id: string | null
|
||||
complex_id: string | null
|
||||
pos_id: string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceMaxAggregateOutputType = {
|
||||
@@ -57,7 +57,7 @@ export type SalesInvoiceMaxAggregateOutputType = {
|
||||
updated_at: Date | null
|
||||
customer_id: string | null
|
||||
account_id: string | null
|
||||
complex_id: string | null
|
||||
pos_id: string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceCountAggregateOutputType = {
|
||||
@@ -71,7 +71,7 @@ export type SalesInvoiceCountAggregateOutputType = {
|
||||
updated_at: number
|
||||
customer_id: number
|
||||
account_id: number
|
||||
complex_id: number
|
||||
pos_id: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export type SalesInvoiceMinAggregateInputType = {
|
||||
updated_at?: true
|
||||
customer_id?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
pos_id?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceMaxAggregateInputType = {
|
||||
@@ -107,7 +107,7 @@ export type SalesInvoiceMaxAggregateInputType = {
|
||||
updated_at?: true
|
||||
customer_id?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
pos_id?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceCountAggregateInputType = {
|
||||
@@ -121,7 +121,7 @@ export type SalesInvoiceCountAggregateInputType = {
|
||||
updated_at?: true
|
||||
customer_id?: true
|
||||
account_id?: true
|
||||
complex_id?: true
|
||||
pos_id?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export type SalesInvoiceGroupByOutputType = {
|
||||
updated_at: Date
|
||||
customer_id: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
_count: SalesInvoiceCountAggregateOutputType | null
|
||||
_avg: SalesInvoiceAvgAggregateOutputType | null
|
||||
_sum: SalesInvoiceSumAggregateOutputType | null
|
||||
@@ -259,8 +259,10 @@ export type SalesInvoiceWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customer_id?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
account_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
complex_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
pos_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||
}
|
||||
@@ -276,8 +278,10 @@ export type SalesInvoiceOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
pos_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
pos?: Prisma.PosOrderByWithRelationInput
|
||||
account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
payments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
||||
@@ -297,8 +301,10 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
|
||||
updated_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customer_id?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
account_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
complex_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
pos_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||
pos?: Prisma.XOR<Prisma.PosScalarRelationFilter, Prisma.PosWhereInput>
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
payments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||
}, "id" | "code">
|
||||
@@ -314,7 +320,7 @@ export type SalesInvoiceOrderByWithAggregationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
pos_id?: Prisma.SortOrder
|
||||
_count?: Prisma.SalesInvoiceCountOrderByAggregateInput
|
||||
_avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput
|
||||
_max?: Prisma.SalesInvoiceMaxOrderByAggregateInput
|
||||
@@ -336,7 +342,7 @@ export type SalesInvoiceScalarWhereWithAggregatesInput = {
|
||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
||||
customer_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoice"> | string | null
|
||||
account_id?: Prisma.StringWithAggregatesFilter<"SalesInvoice"> | string
|
||||
complex_id?: Prisma.StringWithAggregatesFilter<"SalesInvoice"> | string
|
||||
pos_id?: Prisma.StringWithAggregatesFilter<"SalesInvoice"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateInput = {
|
||||
@@ -348,9 +354,9 @@ export type SalesInvoiceCreateInput = {
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||
pos: Prisma.PosCreateNestedOneWithoutSalesInvoicesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
@@ -366,7 +372,7 @@ export type SalesInvoiceUncheckedCreateInput = {
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
@@ -380,9 +386,9 @@ export type SalesInvoiceUpdateInput = {
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||
pos?: Prisma.PosUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
@@ -398,7 +404,7 @@ export type SalesInvoiceUncheckedUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
@@ -414,7 +420,7 @@ export type SalesInvoiceCreateManyInput = {
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyMutationInput = {
|
||||
@@ -426,8 +432,6 @@ export type SalesInvoiceUpdateManyMutationInput = {
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyInput = {
|
||||
@@ -441,7 +445,7 @@ export type SalesInvoiceUncheckedUpdateManyInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceListRelationFilter = {
|
||||
@@ -471,7 +475,7 @@ export type SalesInvoiceCountOrderByAggregateInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
pos_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceAvgOrderByAggregateInput = {
|
||||
@@ -488,7 +492,7 @@ export type SalesInvoiceMaxOrderByAggregateInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
pos_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceMinOrderByAggregateInput = {
|
||||
@@ -501,7 +505,7 @@ export type SalesInvoiceMinOrderByAggregateInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
pos_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceSumOrderByAggregateInput = {
|
||||
@@ -513,6 +517,90 @@ export type SalesInvoiceScalarRelationFilter = {
|
||||
isNot?: Prisma.SalesInvoiceWhereInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateNestedManyWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput> | Prisma.SalesInvoiceCreateWithoutAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyAccountInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput> | Prisma.SalesInvoiceCreateWithoutAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyAccountInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput> | Prisma.SalesInvoiceCreateWithoutAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyAccountInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutAccountInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutAccountInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput> | Prisma.SalesInvoiceCreateWithoutAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutAccountInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutAccountInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyAccountInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutAccountInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutAccountInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateNestedManyWithoutPosInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput> | Prisma.SalesInvoiceCreateWithoutPosInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutPosInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput> | Prisma.SalesInvoiceCreateWithoutPosInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosInputEnvelope
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyWithoutPosNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput> | Prisma.SalesInvoiceCreateWithoutPosInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput> | Prisma.SalesInvoiceCreateWithoutPosInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosInput[]
|
||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosInput[]
|
||||
createMany?: Prisma.SalesInvoiceCreateManyPosInputEnvelope
|
||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosInput[]
|
||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosInput[]
|
||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateNestedManyWithoutCustomerInput = {
|
||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||
@@ -591,6 +679,135 @@ export type SalesInvoiceUpdateOneRequiredWithoutPaymentsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutPaymentsInput, Prisma.SalesInvoiceUpdateWithoutPaymentsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutPaymentsInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||
pos: Prisma.PosCreateNestedOneWithoutSalesInvoicesInput
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
pos_id: string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateOrConnectWithoutAccountInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyAccountInputEnvelope = {
|
||||
data: Prisma.SalesInvoiceCreateManyAccountInput | Prisma.SalesInvoiceCreateManyAccountInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutAccountInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutAccountInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutAccountInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyWithWhereWithoutAccountInput = {
|
||||
where: Prisma.SalesInvoiceScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceScalarWhereInput = {
|
||||
AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
OR?: Prisma.SalesInvoiceScalarWhereInput[]
|
||||
NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
code?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
total_amount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
unknown_customer?: Prisma.JsonNullableFilter<"SalesInvoice">
|
||||
invoice_date?: Prisma.DateTimeNullableFilter<"SalesInvoice"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customer_id?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
account_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
pos_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutPosInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedCreateWithoutPosInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateOrConnectWithoutPosInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyPosInputEnvelope = {
|
||||
data: Prisma.SalesInvoiceCreateManyPosInput | Prisma.SalesInvoiceCreateManyPosInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutPosInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosInput>
|
||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutPosInput = {
|
||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateManyWithWhereWithoutPosInput = {
|
||||
where: Prisma.SalesInvoiceScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||
id?: string
|
||||
code: string
|
||||
@@ -600,8 +817,8 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos: Prisma.PosCreateNestedOneWithoutSalesInvoicesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
@@ -616,7 +833,7 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
@@ -647,23 +864,6 @@ export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = {
|
||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type SalesInvoiceScalarWhereInput = {
|
||||
AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
OR?: Prisma.SalesInvoiceScalarWhereInput[]
|
||||
NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
code?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
total_amount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
unknown_customer?: Prisma.JsonNullableFilter<"SalesInvoice">
|
||||
invoice_date?: Prisma.DateTimeNullableFilter<"SalesInvoice"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||
customer_id?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||
account_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
complex_id?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateWithoutItemsInput = {
|
||||
id?: string
|
||||
code: string
|
||||
@@ -673,9 +873,9 @@ export type SalesInvoiceCreateWithoutItemsInput = {
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||
pos: Prisma.PosCreateNestedOneWithoutSalesInvoicesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
payments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -690,7 +890,7 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -719,9 +919,9 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||
pos?: Prisma.PosUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
@@ -736,7 +936,7 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
@@ -749,9 +949,9 @@ export type SalesInvoiceCreateWithoutPaymentsInput = {
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
customer?: Prisma.CustomerCreateNestedOneWithoutSales_invoicesInput
|
||||
pos: Prisma.PosCreateNestedOneWithoutSalesInvoicesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -766,7 +966,7 @@ export type SalesInvoiceUncheckedCreateWithoutPaymentsInput = {
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||
}
|
||||
|
||||
@@ -795,9 +995,9 @@ export type SalesInvoiceUpdateWithoutPaymentsInput = {
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||
pos?: Prisma.PosUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
@@ -812,10 +1012,122 @@ export type SalesInvoiceUncheckedUpdateWithoutPaymentsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyAccountInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
pos_id: string
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||
pos?: Prisma.PosUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyPosInput = {
|
||||
id?: string
|
||||
code: string
|
||||
total_amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Date | string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
customer_id?: string | null
|
||||
account_id: string
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithoutPosInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer?: Prisma.CustomerUpdateOneWithoutSales_invoicesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateWithoutPosInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
total_amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
customer_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type SalesInvoiceCreateManyCustomerInput = {
|
||||
id?: string
|
||||
code: string
|
||||
@@ -826,7 +1138,7 @@ export type SalesInvoiceCreateManyCustomerInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
}
|
||||
|
||||
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||
@@ -838,8 +1150,8 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||
invoice_date?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
@@ -854,7 +1166,7 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
payments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||
}
|
||||
@@ -869,7 +1181,7 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
|
||||
@@ -923,8 +1235,10 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
updated_at?: boolean
|
||||
customer_id?: boolean
|
||||
account_id?: boolean
|
||||
complex_id?: boolean
|
||||
pos_id?: boolean
|
||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -943,12 +1257,14 @@ export type SalesInvoiceSelectScalar = {
|
||||
updated_at?: boolean
|
||||
customer_id?: boolean
|
||||
account_id?: boolean
|
||||
complex_id?: boolean
|
||||
pos_id?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "total_amount" | "notes" | "unknown_customer" | "invoice_date" | "created_at" | "updated_at" | "customer_id" | "account_id" | "complex_id", ExtArgs["result"]["salesInvoice"]>
|
||||
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "total_amount" | "notes" | "unknown_customer" | "invoice_date" | "created_at" | "updated_at" | "customer_id" | "account_id" | "pos_id", ExtArgs["result"]["salesInvoice"]>
|
||||
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.PosDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||
payments?: boolean | Prisma.SalesInvoice$paymentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -958,6 +1274,8 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
name: "SalesInvoice"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||
pos: Prisma.$PosPayload<ExtArgs>
|
||||
account: Prisma.$ConsumerAccountPayload<ExtArgs>
|
||||
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
payments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
||||
}
|
||||
@@ -972,7 +1290,7 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
updated_at: Date
|
||||
customer_id: string | null
|
||||
account_id: string
|
||||
complex_id: string
|
||||
pos_id: string
|
||||
}, ExtArgs["result"]["salesInvoice"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1314,6 +1632,8 @@ readonly fields: SalesInvoiceFieldRefs;
|
||||
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
pos<T extends Prisma.PosDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosDefaultArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.ConsumerAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
payments<T extends Prisma.SalesInvoice$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
@@ -1355,7 +1675,7 @@ export interface SalesInvoiceFieldRefs {
|
||||
readonly updated_at: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
||||
readonly customer_id: Prisma.FieldRef<"SalesInvoice", 'String'>
|
||||
readonly account_id: Prisma.FieldRef<"SalesInvoice", 'String'>
|
||||
readonly complex_id: Prisma.FieldRef<"SalesInvoice", 'String'>
|
||||
readonly pos_id: Prisma.FieldRef<"SalesInvoice", 'String'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
+12
-4
@@ -6,13 +6,15 @@ 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 { PosGuard } from './common/guards/pos.gaurd'
|
||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||
import { ResponseMappingInterceptor } from './common/interceptors/response-mapping.interceptor'
|
||||
import { PrismaService } from './prisma/prisma.service'
|
||||
const cookieParser = require('cookie-parser')
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule)
|
||||
|
||||
const cookieParser = (await import('cookie-parser')).default
|
||||
app.use(cookieParser())
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
@@ -53,18 +55,21 @@ async function bootstrap() {
|
||||
|
||||
// Enable CORS. You can set `CORS_ORIGINS` to a comma-separated list of allowed origins.
|
||||
// Defaults include common localhost origins used by front-end dev servers.
|
||||
const defaultOrigins = ['*', 'http://localhost:5000']
|
||||
const defaultOrigins = ['http://localhost:5000', 'http://127.0.0.1:5000']
|
||||
const envOrigins = process.env.CORS_ORIGINS
|
||||
? process.env.CORS_ORIGINS.split(',')
|
||||
.map(s => s.trim())
|
||||
.filter(Boolean)
|
||||
: []
|
||||
const allowedOrigins = envOrigins.length ? envOrigins : defaultOrigins
|
||||
const allowedOrigins = (envOrigins.length ? envOrigins : defaultOrigins).filter(
|
||||
origin => origin !== '*',
|
||||
)
|
||||
app.enableCors({
|
||||
origin: allowedOrigins,
|
||||
credentials: true,
|
||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
|
||||
allowedHeaders: 'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token',
|
||||
allowedHeaders:
|
||||
'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token, pos_id',
|
||||
})
|
||||
|
||||
// Register global logging and response mapping interceptors
|
||||
@@ -77,6 +82,9 @@ async function bootstrap() {
|
||||
app.useGlobalFilters(new ValidationExceptionFilter(), new PrismaExceptionFilter())
|
||||
|
||||
app.useGlobalGuards(new JwtAuthGuard(app.get(JwtService), app.get(Reflector)))
|
||||
app.useGlobalGuards(
|
||||
new PosGuard(app.get(JwtService), app.get(Reflector), app.get(PrismaService)),
|
||||
)
|
||||
|
||||
await app.listen(process.env.PORT ?? 5002)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { AuthUtils } from './auth.utils'
|
||||
imports: [
|
||||
PrismaModule,
|
||||
JwtModule.register({
|
||||
secret: env('JWT_SECRET') || 'secret',
|
||||
secret: env('JWT_SECRET'),
|
||||
signOptions: { expiresIn: Number(env('JWT_EXPIRES_IN')) || '48h' },
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Injectable, NotFoundException } from '@nestjs/common'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { env } from 'prisma/config'
|
||||
import { AccessTokenPayload } from './models'
|
||||
import { AccessTokenPayload } from '../../common/models/tokenPayload.model'
|
||||
|
||||
export interface ITokenPayload {
|
||||
type: AccountType
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { createParamDecorator, ExecutionContext } from '@nestjs/common'
|
||||
import { AccessTokenPayload } from 'common/models/token-model'
|
||||
|
||||
export const reqTokenPayload = createParamDecorator(
|
||||
(data: unknown, ctx: ExecutionContext) => {
|
||||
const req = ctx.switchToHttp().getRequest()
|
||||
return req.dataPayload as AccessTokenPayload
|
||||
return req.dataPayload
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||||
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { AccountsService } from './accounts.service'
|
||||
@@ -9,7 +10,7 @@ export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('consumerId') consumerId: string) {
|
||||
async findAll(@TokenAccount('userId') consumerId: string) {
|
||||
return this.accountsService.findAll(consumerId)
|
||||
}
|
||||
|
||||
@@ -20,7 +21,7 @@ export class AccountsController {
|
||||
|
||||
@Post()
|
||||
async create(
|
||||
@Param('consumerId') consumerId: string,
|
||||
@TokenAccount('userId') consumerId: string,
|
||||
@Body() data: CreateConsumerAccountDto,
|
||||
) {
|
||||
return this.accountsService.create(consumerId, data)
|
||||
|
||||
@@ -72,8 +72,8 @@ export class AccountsService {
|
||||
return ResponseMapper.update(account)
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
await this.prisma.account.delete({ where: { id } })
|
||||
return ResponseMapper.delete()
|
||||
}
|
||||
// async delete(id: string) {
|
||||
// await this.prisma.account.delete({ where: { id } })
|
||||
// return ResponseMapper.delete()
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ export class ConsumerComplexGoodsController {
|
||||
@Param('businessActivityId') businessActivityId: string,
|
||||
@Param('complexId') complexId: string,
|
||||
) {
|
||||
console.log(userId, businessActivityId, complexId)
|
||||
|
||||
return this.service.findAll(userId, businessActivityId, complexId)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { reqTokenPayload } from '../../auth/current-user.decorator'
|
||||
import { CreateGoodCategoryDto } from './dto/create-good-category.dto'
|
||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
||||
import type { IPosPayload } from '@/common/models/posPayload.model'
|
||||
import { Controller, Get } from '@nestjs/common'
|
||||
import { GoodCategoriesService } from './good-categories.service'
|
||||
|
||||
@Controller('pos/good_categories')
|
||||
@@ -8,17 +8,17 @@ export class GoodCategoriesController {
|
||||
constructor(private readonly goodCategoriesService: GoodCategoriesService) {}
|
||||
|
||||
@Get()
|
||||
findAll(@reqTokenPayload() account) {
|
||||
return this.goodCategoriesService.findAll(account.complex_id)
|
||||
findAll(@PosInfo() { complex_id, guild_id }: IPosPayload) {
|
||||
return this.goodCategoriesService.findAll(complex_id, guild_id)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string, @reqTokenPayload() account) {
|
||||
return this.goodCategoriesService.findOne(id, account.complex_id)
|
||||
}
|
||||
// @Get(':id')
|
||||
// findOne(@Param('id') id: string, @PosInfo() { complex_id, guild_id }: IPosPayload) {
|
||||
// return this.goodCategoriesService.findOne(id, account.complex_id)
|
||||
// }
|
||||
|
||||
@Post()
|
||||
create(@Body() data: CreateGoodCategoryDto, @reqTokenPayload() account) {
|
||||
return this.goodCategoriesService.create(data, account.complex_id)
|
||||
}
|
||||
// @Post()
|
||||
// create(@Body() data: CreateGoodCategoryDto, @reqTokenPayload() account) {
|
||||
// return this.goodCategoriesService.create(data, account.complex_id)
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,26 +1,40 @@
|
||||
import { GoodCategorySelect } from '@/generated/prisma/models'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from '../../../common/response/response-mapper'
|
||||
import { PrismaService } from '../../../prisma/prisma.service'
|
||||
import { CreateGoodCategoryDto } from './dto/create-good-category.dto'
|
||||
|
||||
@Injectable()
|
||||
export class GoodCategoriesService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
async findAll(complex_id: string) {
|
||||
|
||||
private readonly defaultSelect: GoodCategorySelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
image_url: true,
|
||||
}
|
||||
|
||||
async findAll(complex_id: string, guild_id: string) {
|
||||
const categories = await this.prisma.goodCategory.findMany({
|
||||
where: {
|
||||
complex_id,
|
||||
guild_id,
|
||||
},
|
||||
include: {
|
||||
select: {
|
||||
...this.defaultSelect,
|
||||
_count: {
|
||||
select: {
|
||||
goods: true,
|
||||
goods: {
|
||||
where: {
|
||||
OR: [
|
||||
{ is_default_guild_good: true },
|
||||
{
|
||||
complex_id,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: {
|
||||
complex_id: true,
|
||||
},
|
||||
})
|
||||
|
||||
return ResponseMapper.list(
|
||||
@@ -34,18 +48,18 @@ export class GoodCategoriesService {
|
||||
)
|
||||
}
|
||||
|
||||
findOne(categoryId: string, complex_id: string) {
|
||||
return {}
|
||||
}
|
||||
// findOne(categoryId: string, complex_id: string) {
|
||||
// return {}
|
||||
// }
|
||||
|
||||
create(data: CreateGoodCategoryDto, complex_id: string) {
|
||||
const category = this.prisma.goodCategory.create({
|
||||
data: {
|
||||
...data,
|
||||
complex_id,
|
||||
},
|
||||
})
|
||||
// create(data: CreateGoodCategoryDto, complex_id: string) {
|
||||
// const category = this.prisma.goodCategory.create({
|
||||
// data: {
|
||||
// ...data,
|
||||
// complex_id,
|
||||
// },
|
||||
// })
|
||||
|
||||
return ResponseMapper.create(category)
|
||||
}
|
||||
// return ResponseMapper.create(category)
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { reqTokenPayload } from '../../auth/current-user.decorator'
|
||||
import { CreateGoodDto } from './dto/create-good.dto'
|
||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
||||
import type { IPosPayload } from '@/common/models/posPayload.model'
|
||||
import { Controller, Get, Param } from '@nestjs/common'
|
||||
import { GoodsService } from './goods.service'
|
||||
|
||||
@Controller('pos/goods')
|
||||
@@ -8,17 +8,17 @@ export class GoodsController {
|
||||
constructor(private readonly goodsService: GoodsService) {}
|
||||
|
||||
@Get()
|
||||
findAll(@reqTokenPayload() account) {
|
||||
return this.goodsService.findAll(account.complex_id)
|
||||
findAll(@PosInfo() { complex_id, guild_id }: IPosPayload) {
|
||||
return this.goodsService.findAll(complex_id, guild_id)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') goodId: string, @reqTokenPayload() account) {
|
||||
return this.goodsService.findOne(goodId, account.complex_id)
|
||||
findOne(@PosInfo() { complex_id, guild_id }: IPosPayload, @Param('id') goodId: string) {
|
||||
return this.goodsService.findOne(goodId, complex_id, guild_id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() data: CreateGoodDto, @reqTokenPayload() account) {
|
||||
return this.goodsService.create(data, account.complex_id)
|
||||
}
|
||||
// @Post()
|
||||
// create(@Body() data: CreateGoodDto, @PosInfo() { complex_id, guild_id }: IPosPayload) {
|
||||
// return this.goodsService.create(data, complex_id, guild_id)
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { GoodSelect } from '@/generated/prisma/models'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from '../../../common/response/response-mapper'
|
||||
import { PrismaService } from '../../../prisma/prisma.service'
|
||||
@@ -7,31 +8,59 @@ import { CreateGoodDto } from './dto/create-good.dto'
|
||||
export class GoodsService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async findAll(complex_id: string) {
|
||||
private readonly defaultSelect: GoodSelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
barcode: true,
|
||||
created_at: true,
|
||||
description: true,
|
||||
sku: true,
|
||||
local_sku: true,
|
||||
is_default_guild_good: true,
|
||||
pricing_model: true,
|
||||
unit_type: true,
|
||||
category: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
image_url: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
async findAll(complex_id: string, guild_id: string) {
|
||||
const goods = await this.prisma.good.findMany({
|
||||
where: {
|
||||
complex_id,
|
||||
},
|
||||
omit: {
|
||||
complex_id: true,
|
||||
deleted_at: true,
|
||||
OR: [
|
||||
{
|
||||
is_default_guild_good: true,
|
||||
category: {
|
||||
guild_id,
|
||||
},
|
||||
},
|
||||
{
|
||||
complex_id,
|
||||
},
|
||||
],
|
||||
},
|
||||
select: this.defaultSelect,
|
||||
})
|
||||
|
||||
return ResponseMapper.list(goods)
|
||||
}
|
||||
|
||||
async findOne(good_id: string, complex_id: string) {
|
||||
async findOne(good_id: string, complex_id: string, guild_id: string) {
|
||||
const good = await this.prisma.good.findUnique({
|
||||
where: {
|
||||
complex_id,
|
||||
id: good_id,
|
||||
complex: {
|
||||
id: complex_id,
|
||||
business_activity: {
|
||||
guild_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
omit: {
|
||||
complex_id: true,
|
||||
deleted_at: true,
|
||||
},
|
||||
select: this.defaultSelect,
|
||||
})
|
||||
|
||||
return ResponseMapper.single(good)
|
||||
@@ -64,10 +93,7 @@ export class GoodsService {
|
||||
},
|
||||
},
|
||||
},
|
||||
omit: {
|
||||
complex_id: true,
|
||||
deleted_at: true,
|
||||
},
|
||||
select: this.defaultSelect,
|
||||
})
|
||||
|
||||
return ResponseMapper.create(good)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
||||
import { Controller, Get } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { PosService } from './pos.service'
|
||||
|
||||
@ApiTags('Pos')
|
||||
@Controller('pos')
|
||||
export class PosController {
|
||||
constructor(private service: PosService) {}
|
||||
|
||||
@Get()
|
||||
async getInfo(@PosInfo('pos_id') pos_id: string) {
|
||||
return await this.service.getInfo(pos_id)
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,97 @@
|
||||
import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common'
|
||||
import { checkAndDecodeJwtToken } from '@/common/utils/jwt-user.util'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { ForbiddenException, Injectable, NestMiddleware } from '@nestjs/common'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { NextFunction, Request, Response } from 'express'
|
||||
|
||||
@Injectable()
|
||||
export class PosMiddleware implements NestMiddleware {
|
||||
use(req: Request, _res: Response, next: NextFunction) {
|
||||
// const a = reqTokenPayload()
|
||||
// console.log(a)
|
||||
constructor(
|
||||
private prisma: PrismaService,
|
||||
private jwtService: JwtService,
|
||||
) {}
|
||||
|
||||
// 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
|
||||
async use(req: Request, _res: Response, next: NextFunction) {
|
||||
const doForbidden = () => {
|
||||
throw new ForbiddenException('شما دسترسی لازم را ندارید')
|
||||
}
|
||||
return next()
|
||||
try {
|
||||
const tokenAccount = checkAndDecodeJwtToken(req, this.jwtService)
|
||||
|
||||
throw new UnauthorizedException('Admin access required')
|
||||
// const posId = req.cookies['posId']
|
||||
const posId = req.headers.pos_id as string
|
||||
|
||||
if (tokenAccount?.type !== 'CONSUMER' || !posId || typeof posId !== 'string') {
|
||||
return doForbidden()
|
||||
}
|
||||
|
||||
const consumerAccount = await this.prisma.consumerAccount.findUnique({
|
||||
where: {
|
||||
account_id: tokenAccount.account_id,
|
||||
},
|
||||
})
|
||||
if (!consumerAccount) {
|
||||
return doForbidden()
|
||||
}
|
||||
|
||||
const complex = await this.prisma.complex.findFirst({
|
||||
where: {
|
||||
pos_list: {
|
||||
some: {
|
||||
id: posId,
|
||||
},
|
||||
},
|
||||
},
|
||||
include: {
|
||||
business_activity: {
|
||||
include: {
|
||||
guild: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
if (!complex) {
|
||||
return doForbidden()
|
||||
}
|
||||
|
||||
// if (account?.role !== ConsumerRole.OWNER) {
|
||||
// const accountPermissions = await this.prisma.permissionConsumer.findUnique({
|
||||
// where: {
|
||||
// account_id: account?.id,
|
||||
// },
|
||||
// include: {
|
||||
// posPermissions: true,
|
||||
// businessPermissions: true,
|
||||
// complexPermissions: true,
|
||||
// },
|
||||
// })
|
||||
|
||||
// if (
|
||||
// !(
|
||||
// accountPermissions?.businessPermissions.some(
|
||||
// permission => permission.business_id,
|
||||
// ) ||
|
||||
// accountPermissions?.complexPermissions.some(
|
||||
// permission => permission.complex_id,
|
||||
// ) ||
|
||||
// accountPermissions?.posPermissions.some(permission => permission.pos_id)
|
||||
// )
|
||||
// ) {
|
||||
// return doForbidden()
|
||||
// }
|
||||
// }
|
||||
req.posData = {
|
||||
pos_id: posId,
|
||||
complex_id: complex.id,
|
||||
business_id: complex.business_activity_id,
|
||||
guild_id: complex.business_activity.guild_id,
|
||||
consumer_account_id: consumerAccount.id,
|
||||
}
|
||||
req.decodedToken = tokenAccount
|
||||
|
||||
return next()
|
||||
} catch (error) {
|
||||
return doForbidden()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from '@nestjs/common'
|
||||
import { JwtService } from '@nestjs/jwt'
|
||||
import { PosConfigModule } from './config/config.module'
|
||||
import { PosCustomersModule } from './customers/customers.module'
|
||||
import { PosGoodCategoriesModule } from './good-categories/good-categories.module'
|
||||
import { PosGoodsModule } from './goods/goods.module'
|
||||
import { PosController } from './pos.controller'
|
||||
import { PosMiddleware } from './pos.middleware'
|
||||
import { PosService } from './pos.service'
|
||||
import { PosSalesInvoicesModule } from './sales-invoices/sales-invoices.module'
|
||||
|
||||
@Module({
|
||||
controllers: [PosController],
|
||||
providers: [PosService, JwtService],
|
||||
imports: [
|
||||
PosConfigModule,
|
||||
PosCustomersModule,
|
||||
@@ -17,11 +22,15 @@ import { PosSalesInvoicesModule } from './sales-invoices/sales-invoices.module'
|
||||
})
|
||||
export class PosModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
// apply middleware to all routes within this module (scoped under /admin)
|
||||
consumer.apply(PosMiddleware).forRoutes({
|
||||
path: '/pos*path',
|
||||
method: RequestMethod.ALL,
|
||||
version: '1',
|
||||
})
|
||||
consumer.apply(PosMiddleware).forRoutes({
|
||||
path: '/pos',
|
||||
method: RequestMethod.ALL,
|
||||
version: '1',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
|
||||
@Injectable()
|
||||
export class PosService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
async getInfo(pos_id: string) {
|
||||
const pos = await this.prisma.pos.findUniqueOrThrow({
|
||||
where: {
|
||||
id: pos_id,
|
||||
},
|
||||
select: {
|
||||
name: true,
|
||||
complex: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
tax_id: true,
|
||||
business_activity: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
guild: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
code: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
const { name, complex } = pos
|
||||
const { name: complexName, id: complexId, tax_id, business_activity } = complex
|
||||
const { name: businessName, id: businessId, guild } = business_activity
|
||||
|
||||
return ResponseMapper.single({
|
||||
name,
|
||||
complex: {
|
||||
id: complexId,
|
||||
name: complexName,
|
||||
tax_id,
|
||||
},
|
||||
businessActivity: {
|
||||
id: businessId,
|
||||
name: businessName,
|
||||
},
|
||||
guild,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import { CustomerType } from 'generated/prisma/enums'
|
||||
import { CreateSalesInvoiceItemDto } from '../sales-invoice-items/dto/create-sales-invoice-item.dto'
|
||||
|
||||
export class CreateSalesInvoiceDto {
|
||||
// @TODO: totalAmount must calculated instead of get from api
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 0 })
|
||||
total_amount: number
|
||||
|
||||
+17
-13
@@ -1,21 +1,33 @@
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsNumber, IsObject, IsOptional, IsString } from 'class-validator'
|
||||
import type { SaleInvoiceStandardPayload } from 'common/interfaces/sale-invoice-payload'
|
||||
import type { SaleInvoiceType } from 'common/interfaces/sale-invoice-payload'
|
||||
import { UnitType } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateSalesInvoiceItemDto {
|
||||
@IsNumber()
|
||||
@ApiProperty()
|
||||
@ApiProperty({ required: true })
|
||||
unit_price: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty()
|
||||
@ApiProperty({ required: true, default: 1 })
|
||||
quantity: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
total_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
discount_amount: number
|
||||
|
||||
@IsString()
|
||||
@ApiProperty()
|
||||
@ApiProperty({ required: true })
|
||||
invoice_id: string
|
||||
|
||||
@IsEnum(UnitType)
|
||||
@ApiProperty({ enum: Object.values(UnitType) })
|
||||
unit_type: UnitType
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
@@ -26,14 +38,6 @@ export class CreateSalesInvoiceItemDto {
|
||||
@ApiProperty({ required: false })
|
||||
service_id?: string
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 1 })
|
||||
quantity: number
|
||||
|
||||
@IsEnum(UnitType)
|
||||
@ApiProperty({ enum: Object.values(UnitType) })
|
||||
unit_type: UnitType
|
||||
|
||||
// @IsEnum(SalesInvoiceItemPricingModel)
|
||||
// @ApiProperty({ enum: Object.values(SalesInvoiceItemPricingModel) })
|
||||
// @IsOptional()
|
||||
@@ -42,7 +46,7 @@ export class CreateSalesInvoiceItemDto {
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
@ApiProperty({ required: false, default: {} })
|
||||
payload?: SaleInvoiceStandardPayload
|
||||
payload: SaleInvoiceType
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
|
||||
import { reqTokenPayload } from '@/modules/auth/current-user.decorator'
|
||||
import { PosInfo } from '@/common/decorators/posInfo.decorator'
|
||||
import type { IPosPayload } from '@/common/models/posPayload.model'
|
||||
import { CreateSalesInvoiceDto } from './dto/create-sales-invoice.dto'
|
||||
import { SalesInvoicesService } from './sales-invoices.service'
|
||||
|
||||
@@ -19,7 +20,7 @@ export class SalesInvoicesController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() data: CreateSalesInvoiceDto, @reqTokenPayload() account) {
|
||||
return this.salesInvoicesService.create(data, account)
|
||||
create(@Body() data: CreateSalesInvoiceDto, @PosInfo() posInfo: IPosPayload) {
|
||||
return this.salesInvoicesService.create(data, posInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IPosPayload } from '@/common/models/posPayload.model'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
@@ -7,12 +8,6 @@ import { CreateSalesInvoiceDto } from './dto/create-sales-invoice.dto'
|
||||
|
||||
// Define type guard for CustomerIndividual
|
||||
function isCustomerIndividual(customer: any): customer is CustomerIndividual {
|
||||
console.log(
|
||||
customer &&
|
||||
typeof customer.first_name === 'string' &&
|
||||
typeof customer.last_name === 'string',
|
||||
)
|
||||
|
||||
return (
|
||||
customer &&
|
||||
typeof customer.first_name === 'string' &&
|
||||
@@ -43,9 +38,11 @@ export class SalesInvoicesService {
|
||||
return {}
|
||||
}
|
||||
|
||||
async create(data: CreateSalesInvoiceDto, account) {
|
||||
async create(data: CreateSalesInvoiceDto, posInfo: IPosPayload) {
|
||||
data.invoice_date = new Date(data.invoice_date).toISOString() as any
|
||||
|
||||
const { complex_id, pos_id, consumer_account_id } = posInfo
|
||||
|
||||
const salesInvoice = await this.prisma.$transaction(async $tx => {
|
||||
const payments = Object.entries(data.payments)
|
||||
.filter(([_, value]) => value > 0 && PaymentMethodType[_.toUpperCase()])
|
||||
@@ -58,6 +55,7 @@ export class SalesInvoicesService {
|
||||
})
|
||||
|
||||
const totalPayments = payments.reduce((sum, payment) => sum + payment.amount, 0)
|
||||
|
||||
if (totalPayments !== data.total_amount) {
|
||||
throw new Error('مبلغ پرداختی باید برابر با مبلغ کل فاکتور باشد.')
|
||||
}
|
||||
@@ -72,7 +70,7 @@ export class SalesInvoicesService {
|
||||
let customerIndividual = await $tx.customerIndividual.findUnique({
|
||||
where: {
|
||||
complex_id_national_id: {
|
||||
complex_id: account.complex_id,
|
||||
complex_id,
|
||||
national_id: customer.national_id,
|
||||
},
|
||||
},
|
||||
@@ -82,7 +80,7 @@ export class SalesInvoicesService {
|
||||
await $tx.customerIndividual.update({
|
||||
where: {
|
||||
complex_id_national_id: {
|
||||
complex_id: account.complex_id,
|
||||
complex_id,
|
||||
national_id: customer.national_id,
|
||||
},
|
||||
},
|
||||
@@ -99,8 +97,7 @@ export class SalesInvoicesService {
|
||||
const createdCustomer = await $tx.customer.create({
|
||||
data: {
|
||||
type: CustomerType.INDIVIDUAL,
|
||||
complex_id: account.complex_id,
|
||||
customerIndividuals: {
|
||||
customer_individuals: {
|
||||
connect: {
|
||||
customer_id: customerIndividual.customer_id,
|
||||
},
|
||||
@@ -116,7 +113,7 @@ export class SalesInvoicesService {
|
||||
let customerLegal = await $tx.customerLegal.findUnique({
|
||||
where: {
|
||||
complex_id_registration_number: {
|
||||
complex_id: account.complex_id,
|
||||
complex_id,
|
||||
registration_number: customer.registration_number,
|
||||
},
|
||||
},
|
||||
@@ -126,7 +123,7 @@ export class SalesInvoicesService {
|
||||
await $tx.customerLegal.update({
|
||||
where: {
|
||||
complex_id_registration_number: {
|
||||
complex_id: account.complex_id,
|
||||
complex_id,
|
||||
registration_number: customer.registration_number,
|
||||
},
|
||||
},
|
||||
@@ -143,8 +140,8 @@ export class SalesInvoicesService {
|
||||
const createdCustomer = await $tx.customer.create({
|
||||
data: {
|
||||
type: CustomerType.LEGAL,
|
||||
complex_id: account.complex_id,
|
||||
customerIndividuals: {
|
||||
|
||||
customer_individuals: {
|
||||
connect: {
|
||||
customer_id: customerLegal.customer_id,
|
||||
},
|
||||
@@ -156,16 +153,15 @@ export class SalesInvoicesService {
|
||||
newCustomerId = createdCustomer.id
|
||||
}
|
||||
}
|
||||
} else if (data.customer_type === CustomerType.UNKNOWN) {
|
||||
}
|
||||
|
||||
const salesInvoice = await $tx.salesInvoice.create({
|
||||
data: {
|
||||
...invoiceData,
|
||||
account_id: account.account_id,
|
||||
customer_id: newCustomerId,
|
||||
total_amount: data.total_amount,
|
||||
code: 'INV-' + Date.now(),
|
||||
complex_id: account.complex_id,
|
||||
|
||||
items: {
|
||||
createMany: {
|
||||
data: data.items.map(item => ({
|
||||
@@ -173,17 +169,33 @@ export class SalesInvoicesService {
|
||||
quantity: item.quantity,
|
||||
unit_price: item.unit_price,
|
||||
total_amount: item.total_amount,
|
||||
payload: item.payload,
|
||||
payload: JSON.parse(JSON.stringify(item.payload)),
|
||||
unit_type: item.unit_type,
|
||||
// pricing_model: item.pricingModel,
|
||||
})),
|
||||
},
|
||||
},
|
||||
unknown_customer: {},
|
||||
payments: {
|
||||
createMany: {
|
||||
data: payments,
|
||||
},
|
||||
},
|
||||
// customer: {
|
||||
// connect: {
|
||||
// id: newCustomerId,
|
||||
// },
|
||||
// },
|
||||
account: {
|
||||
connect: {
|
||||
id: consumer_account_id,
|
||||
},
|
||||
},
|
||||
pos: {
|
||||
connect: {
|
||||
id: pos_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { PartialType } from '@nestjs/swagger'
|
||||
|
||||
export class CreateProfileDto {}
|
||||
|
||||
export class UpdateProfileDto extends PartialType(CreateProfileDto) {}
|
||||
@@ -1,13 +0,0 @@
|
||||
import { Controller, Get } from '@nestjs/common'
|
||||
import { reqTokenPayload } from '../auth/current-user.decorator'
|
||||
import { ProfileService } from './profile.service'
|
||||
|
||||
@Controller('profile')
|
||||
export class ProfileController {
|
||||
constructor(private readonly profileService: ProfileService) {}
|
||||
|
||||
@Get('me')
|
||||
findOne(@reqTokenPayload() account) {
|
||||
return this.profileService.findOne(account)
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { ProfileController } from './profile.controller'
|
||||
import { ProfileService } from './profile.service'
|
||||
|
||||
@Module({
|
||||
controllers: [ProfileController],
|
||||
providers: [ProfileService],
|
||||
})
|
||||
export class ProfileModule {}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { Public } from 'common/decorators/public.decorator'
|
||||
import type { AccessTokenPayload } from 'common/models/token-model'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
|
||||
@Injectable()
|
||||
export class ProfileService {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
@Public()
|
||||
async findOne(account: AccessTokenPayload) {
|
||||
return ResponseMapper.single(account)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user