email to id updation
This commit is contained in:
parent
0fceef8c44
commit
5c24732ae4
@ -1,4 +1,4 @@
|
||||
import { IsString, IsNumber, IsDate, IsOptional, IsEmail, IsArray, IsObject } from 'class-validator';
|
||||
import { IsString, IsNumber, IsDate, IsOptional, IsObject } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IsString, IsNumber, IsDate, IsOptional, IsEmail, IsObject } from 'class-validator';
|
||||
import { IsString, IsNumber, IsDate, IsOptional } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { IsString, IsEmail, IsNumber, IsDate, IsOptional, IsNotEmpty, IsEnum } from 'class-validator';
|
||||
import { IsString, IsNumber, IsDate, IsOptional, IsNotEmpty, IsEnum } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
export class PayoutDTO {
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsEmail()
|
||||
@ApiProperty({ type: Number })
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
payeeEmail: string;
|
||||
payeeId: number;
|
||||
|
||||
@ApiProperty({ type: Number })
|
||||
@IsNumber()
|
||||
@ -24,10 +24,10 @@ export class PayoutDTO {
|
||||
@IsNotEmpty()
|
||||
transactionId: string;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsEmail()
|
||||
@ApiProperty({ type: Number })
|
||||
@IsNotEmpty()
|
||||
paidToEmail: string;
|
||||
@IsNumber()
|
||||
paidToId: number;
|
||||
|
||||
@ApiProperty({ type: Date })
|
||||
@IsDate()
|
||||
|
||||
@ -4,9 +4,9 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
@Table({ tableName: 'payouts', paranoid: true })
|
||||
export default class Payout extends Model {
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@Column({ type: DataType.TEXT, field: 'payee_email' })
|
||||
payeeEmail: string;
|
||||
@ApiProperty({ type: Number })
|
||||
@Column({ type: DataType.NUMBER, field: 'payee_id' })
|
||||
payeeId: number;
|
||||
|
||||
@ApiProperty({ type: Number })
|
||||
@Column({ type: DataType.NUMBER, field: 'amount' })
|
||||
@ -21,8 +21,8 @@ export default class Payout extends Model {
|
||||
transactionId: string;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@Column({ type: DataType.TEXT, field: 'paid_to_email' })
|
||||
paidToEmail: string;
|
||||
@Column({ type: DataType.TEXT, field: 'paid_to_id' })
|
||||
paidToId: string;
|
||||
|
||||
@ApiProperty({ type: Date })
|
||||
@Column({ type: DataType.DATEONLY, field: 'payout_date' })
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IsString, IsNumber, IsDate, IsNotEmpty, IsOptional, IsEmail } from 'class-validator';
|
||||
import { IsString, IsNumber, IsDate, IsNotEmpty, IsOptional } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
@ -9,10 +9,10 @@ export class ReviewDTO {
|
||||
@IsNotEmpty()
|
||||
eventId: number;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsEmail()
|
||||
@ApiProperty({ type: Number })
|
||||
@IsNotEmpty()
|
||||
buyerEmail: string;
|
||||
@IsNumber()
|
||||
buyerId: number;
|
||||
|
||||
@ApiProperty({ type: Number })
|
||||
@IsNumber()
|
||||
|
||||
@ -9,8 +9,8 @@ export default class Review extends Model {
|
||||
eventId: number;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@Column({ type: DataType.TEXT, field: 'buyer_email' })
|
||||
buyerEmail: string;
|
||||
@Column({ type: DataType.TEXT, field: 'buyer_id' })
|
||||
buyerId: string;
|
||||
|
||||
@ApiProperty({ type: Number })
|
||||
@Column({ type: DataType.NUMBER, field: 'rating' })
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IsString, IsNumber, IsDate, IsNotEmpty, IsEmail, IsOptional } from 'class-validator';
|
||||
import { IsString, IsNumber, IsDate, IsNotEmpty, IsOptional } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
@ -30,9 +30,9 @@ export class TicketDTO {
|
||||
qrCode: string;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@IsEmail()
|
||||
@IsNotEmpty()
|
||||
buyerEmail: string;
|
||||
@IsNumber()
|
||||
buyerId: number;
|
||||
|
||||
@ApiProperty({ type: Date })
|
||||
@IsDate()
|
||||
|
||||
@ -24,9 +24,9 @@ export default class Ticket extends Model {
|
||||
@Column({ type: DataType.TEXT, field: 'qr_code' })
|
||||
qrCode: string;
|
||||
|
||||
@ApiProperty({ type: String })
|
||||
@Column({ type: DataType.TEXT, field: 'buyer_email', allowNull: false })
|
||||
buyerEmail: string;
|
||||
@ApiProperty({ type: Number })
|
||||
@Column({ type: DataType.NUMBER, field: 'buyer_id', allowNull: false })
|
||||
buyerId: number;
|
||||
|
||||
@ApiProperty({ type: Date })
|
||||
@Column({ type: DataType.DATEONLY, field: 'booking_date' })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user