63 lines
3.2 KiB
TypeScript
63 lines
3.2 KiB
TypeScript
import { registerEnumType, ObjectType, Field, InputType, Int } from 'type-graphql';
|
|
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
import { StripePaymentIntentData } from './stripe.components';
|
|
import { AddressStrictComponent } from '@seed/interfaces/components.geo';
|
|
|
|
/*
|
|
███████╗███╗ ██╗██╗ ██╗███╗ ███╗
|
|
██╔════╝████╗ ██║██║ ██║████╗ ████║
|
|
█████╗ ██╔██╗ ██║██║ ██║██╔████╔██║
|
|
██╔══╝ ██║╚██╗██║██║ ██║██║╚██╔╝██║
|
|
███████╗██║ ╚████║╚██████╔╝██║ ╚═╝ ██║
|
|
╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
|
|
*/
|
|
|
|
/*
|
|
|
|
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗███████╗
|
|
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝██╔════╝
|
|
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║ ███████╗
|
|
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║
|
|
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║ ███████║
|
|
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
|
|
|
|
*/
|
|
|
|
@ObjectType()
|
|
@InputType('BillingAddressInput')
|
|
export class BillingAddressInput {
|
|
@Field()
|
|
firstName: string;
|
|
|
|
@Field()
|
|
lastName: string;
|
|
|
|
@Field(() => AddressStrictComponent)
|
|
address: AddressStrictComponent;
|
|
|
|
@Field({ nullable: true })
|
|
email?: string;
|
|
|
|
@Field({ nullable: true })
|
|
default?: boolean;
|
|
|
|
@Field(() => GraphQLJSONObject, { nullable: true })
|
|
customTags?: any;
|
|
|
|
@Field({ nullable: true })
|
|
company?: string;
|
|
|
|
@Field({ nullable: true })
|
|
vatNumber?: string;
|
|
|
|
@Field({ nullable: true })
|
|
fiscalForm?: string;
|
|
}
|
|
|
|
@ObjectType()
|
|
@InputType('BillingAddress')
|
|
export class BillingAddressComponent extends BillingAddressInput {
|
|
@Field()
|
|
_id: string;
|
|
}
|