remove graph

This commit is contained in:
2025-11-22 10:49:31 +03:30
parent 2c0ab601f3
commit ee1e6049c5
42 changed files with 364 additions and 875 deletions
@@ -0,0 +1,29 @@
import { IsString, IsOptional, IsBoolean, IsNumber } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreatePaymentMethodDto {
@ApiProperty({ description: 'Payment method name' })
@IsString()
name!: string;
@ApiProperty({ description: 'Payment method description', required: false })
@IsOptional()
@IsString()
description?: string;
@ApiProperty({ description: 'Payment method icon', required: false })
@IsOptional()
@IsString()
icon?: string;
@ApiProperty({ description: 'Is payment method active', required: false, default: true })
@IsOptional()
@IsBoolean()
isActive?: boolean;
@ApiProperty({ description: 'Display order', required: false })
@IsOptional()
@IsNumber()
order?: number;
}
@@ -1,19 +0,0 @@
import { InputType, Field, Int } from '@nestjs/graphql';
@InputType()
export class CreatePaymentMethodInput {
@Field()
name!: string;
@Field({ nullable: true })
description?: string;
@Field({ nullable: true })
icon?: string;
@Field(() => Boolean, { nullable: true, defaultValue: true })
isActive?: boolean;
@Field(() => Int, { nullable: true })
order?: number;
}
@@ -0,0 +1,9 @@
import { IsNumber } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreatePaymentDto {
@ApiProperty({ description: 'Example field (placeholder)' })
@IsNumber()
exampleField: number;
}
@@ -1,7 +0,0 @@
import { InputType, Int, Field } from '@nestjs/graphql';
@InputType()
export class CreatePaymentInput {
@Field(() => Int, { description: 'Example field (placeholder)' })
exampleField: number;
}
@@ -0,0 +1,23 @@
import { IsString, IsOptional, IsBoolean } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateRestaurantPaymentMethodDto {
@ApiProperty({ description: 'Restaurant ID' })
@IsString()
restaurantId!: string;
@ApiProperty({ description: 'Payment method ID' })
@IsString()
paymentMethodId!: string;
@ApiProperty({ description: 'Merchant ID', required: false })
@IsOptional()
@IsString()
merchantId?: string;
@ApiProperty({ description: 'Is active', required: false, default: true })
@IsOptional()
@IsBoolean()
isActive?: boolean;
}
@@ -1,16 +0,0 @@
import { InputType, Field } from '@nestjs/graphql';
@InputType()
export class CreateRestaurantPaymentMethodInput {
@Field()
restaurantId!: string;
@Field()
paymentMethodId!: string;
@Field({ nullable: true })
merchantId?: string;
@Field({ nullable: true })
isActive?: boolean;
}
@@ -0,0 +1,11 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreatePaymentMethodDto } from './create-payment-method.dto';
import { IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class UpdatePaymentMethodDto extends PartialType(CreatePaymentMethodDto) {
@ApiProperty({ description: 'Payment method ID' })
@IsString()
id!: string;
}
@@ -1,8 +0,0 @@
import { CreatePaymentMethodInput } from './create-payment-method.input';
import { InputType, Field, PartialType } from '@nestjs/graphql';
@InputType()
export class UpdatePaymentMethodInput extends PartialType(CreatePaymentMethodInput) {
@Field()
id!: string;
}
@@ -0,0 +1,11 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreatePaymentDto } from './create-payment.dto';
import { IsNumber } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class UpdatePaymentDto extends PartialType(CreatePaymentDto) {
@ApiProperty({ description: 'Payment ID' })
@IsNumber()
id: number;
}
@@ -1,8 +0,0 @@
import { CreatePaymentInput } from './create-payment.input';
import { InputType, Field, Int, PartialType } from '@nestjs/graphql';
@InputType()
export class UpdatePaymentInput extends PartialType(CreatePaymentInput) {
@Field(() => Int)
id: number;
}
@@ -0,0 +1,11 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreateRestaurantPaymentMethodDto } from './create-restaurant-payment-method.dto';
import { IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class UpdateRestaurantPaymentMethodDto extends PartialType(CreateRestaurantPaymentMethodDto) {
@ApiProperty({ description: 'Restaurant payment method ID' })
@IsString()
id!: string;
}
@@ -1,8 +0,0 @@
import { CreateRestaurantPaymentMethodInput } from './create-restaurant-payment-method.input';
import { InputType, Field, PartialType } from '@nestjs/graphql';
@InputType()
export class UpdateRestaurantPaymentMethodInput extends PartialType(CreateRestaurantPaymentMethodInput) {
@Field()
id!: string;
}