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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform } from 'class-transformer';
|
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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform } from 'class-transformer';
|
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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform } from 'class-transformer';
|
import { Transform } from 'class-transformer';
|
||||||
|
|
||||||
export class PayoutDTO {
|
export class PayoutDTO {
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: Number })
|
||||||
@IsEmail()
|
@IsNumber()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
payeeEmail: string;
|
payeeId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Number })
|
@ApiProperty({ type: Number })
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
@ -24,10 +24,10 @@ export class PayoutDTO {
|
|||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
transactionId: string;
|
transactionId: string;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: Number })
|
||||||
@IsEmail()
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
paidToEmail: string;
|
@IsNumber()
|
||||||
|
paidToId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Date })
|
@ApiProperty({ type: Date })
|
||||||
@IsDate()
|
@IsDate()
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import { ApiProperty } from '@nestjs/swagger';
|
|||||||
@Table({ tableName: 'payouts', paranoid: true })
|
@Table({ tableName: 'payouts', paranoid: true })
|
||||||
export default class Payout extends Model {
|
export default class Payout extends Model {
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: Number })
|
||||||
@Column({ type: DataType.TEXT, field: 'payee_email' })
|
@Column({ type: DataType.NUMBER, field: 'payee_id' })
|
||||||
payeeEmail: string;
|
payeeId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Number })
|
@ApiProperty({ type: Number })
|
||||||
@Column({ type: DataType.NUMBER, field: 'amount' })
|
@Column({ type: DataType.NUMBER, field: 'amount' })
|
||||||
@ -21,8 +21,8 @@ export default class Payout extends Model {
|
|||||||
transactionId: string;
|
transactionId: string;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: String })
|
||||||
@Column({ type: DataType.TEXT, field: 'paid_to_email' })
|
@Column({ type: DataType.TEXT, field: 'paid_to_id' })
|
||||||
paidToEmail: string;
|
paidToId: string;
|
||||||
|
|
||||||
@ApiProperty({ type: Date })
|
@ApiProperty({ type: Date })
|
||||||
@Column({ type: DataType.DATEONLY, field: 'payout_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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform } from 'class-transformer';
|
import { Transform } from 'class-transformer';
|
||||||
|
|
||||||
@ -9,10 +9,10 @@ export class ReviewDTO {
|
|||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
eventId: number;
|
eventId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: Number })
|
||||||
@IsEmail()
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
buyerEmail: string;
|
@IsNumber()
|
||||||
|
buyerId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Number })
|
@ApiProperty({ type: Number })
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
|||||||
@ -9,8 +9,8 @@ export default class Review extends Model {
|
|||||||
eventId: number;
|
eventId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: String })
|
||||||
@Column({ type: DataType.TEXT, field: 'buyer_email' })
|
@Column({ type: DataType.TEXT, field: 'buyer_id' })
|
||||||
buyerEmail: string;
|
buyerId: string;
|
||||||
|
|
||||||
@ApiProperty({ type: Number })
|
@ApiProperty({ type: Number })
|
||||||
@Column({ type: DataType.NUMBER, field: 'rating' })
|
@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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform } from 'class-transformer';
|
import { Transform } from 'class-transformer';
|
||||||
|
|
||||||
@ -30,9 +30,9 @@ export class TicketDTO {
|
|||||||
qrCode: string;
|
qrCode: string;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: String })
|
||||||
@IsEmail()
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
buyerEmail: string;
|
@IsNumber()
|
||||||
|
buyerId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Date })
|
@ApiProperty({ type: Date })
|
||||||
@IsDate()
|
@IsDate()
|
||||||
|
|||||||
@ -24,9 +24,9 @@ export default class Ticket extends Model {
|
|||||||
@Column({ type: DataType.TEXT, field: 'qr_code' })
|
@Column({ type: DataType.TEXT, field: 'qr_code' })
|
||||||
qrCode: string;
|
qrCode: string;
|
||||||
|
|
||||||
@ApiProperty({ type: String })
|
@ApiProperty({ type: Number })
|
||||||
@Column({ type: DataType.TEXT, field: 'buyer_email', allowNull: false })
|
@Column({ type: DataType.NUMBER, field: 'buyer_id', allowNull: false })
|
||||||
buyerEmail: string;
|
buyerId: number;
|
||||||
|
|
||||||
@ApiProperty({ type: Date })
|
@ApiProperty({ type: Date })
|
||||||
@Column({ type: DataType.DATEONLY, field: 'booking_date' })
|
@Column({ type: DataType.DATEONLY, field: 'booking_date' })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user