Address embryo

This commit is contained in:
Niklas Fondberg
2021-04-07 18:30:56 +02:00
parent 1b304930d3
commit f3f39b2097
5 changed files with 266 additions and 19 deletions
+149 -4
View File
@@ -9,6 +9,17 @@ const typeDefs = gql`
products(limit: Int, visible: Boolean, browsable: Boolean): [Product]
}
type Address {
id: ID!
firstname: String
}
type ContactInformation {
email: String
phone: String
address: Address
}
type Order {
id: ID!
inserted: DateTime!
@@ -51,11 +62,13 @@ const typeDefs = gql`
customerLastname: String
customerEmail: String
customerCellphone: String
billingAddressId: Int
deliveryAddressId: Int
flyerIds: String
market: String
locale: String
billingInformation: ContactInformation
deliveryInformation: ContactInformation
billingAddressId: Int
deliveryAddressId: Int
}
type Product {
@@ -97,9 +110,141 @@ const typeDefs = gql`
}
`;
export { typeDefs };
/**
schema {
query: Query
}
type Address {
id: ID!
firstname: String
lastname: String
recipientName: String
companyname: String
address1: String
address2: String
countryCode: String
city: String
zipcode: String
stateCountyOrRegion: String
}
type Category {
id: ID!
name: String
}
type ContactInformation {
email: String
phone: String
address: Address
}
scalar Date
scalar DateTime
type Designer {
id: ID!
name: String
orderRows(fromDate: Date, toDate: Date): [OrderRow]
}
enum Group {
PHOTO_WALLPAPER
CANVAS
WALLPAPER
DO_IT_YOURSELF_FRAME
DESIGNER_WALLPAPER
POSTER
FRAMED_PRINT
}
scalar JSONString
type Market {
id: ID!
name: String
}
type Order {
id: ID!
insertedDate: DateTime!
paid: Boolean!
confirmed: Boolean!
delivered: Boolean!
canceled: Boolean!
countryCode: String!
locale: String!
market: String!
currency: String
contractCustomerId: Int
exchangeRateEUR: Float
language: String
pwintyId: Int
email: String
phone: String
rows: [OrderRow]
billingInformation: ContactInformation
deliveryInformation: ContactInformation
}
type OrderRow {
id: ID!
order: Order
insertedDate: DateTime
orderId: Int
productId: Int
productGroup: String
artNo: String
path: String
name: String
price: Float
designerId: String
commissionAmount: String
status: String
pwintyImageId: Int
frameColor: String
pwintySku: String
json: JSONString
}
type PrintProduct {
id: ID!
group: Group!
insertedDate: DateTime!
updatedDate: DateTime
}
type Product {
id: ID!
path: String!
visible: Boolean
browsable: Boolean
insertedDate: DateTime!
updatedDate: DateTime!
categories: [Category]
designer: Designer
printProducts: [PrintProduct]
blacklisting: [ProductBlacklist]
}
type ProductBlacklist {
id: ID!
group: Group!
marketId: String!
insertedDate: DateTime!
updatedDate: DateTime!
market: Market
}
type Query {
products(limit: Int, visible: Boolean, browsable: Boolean): [Product]
product(id: Int!): Product
order(id: Int!): Order
designer(id: Int!): Designer
designers: [Designer]
}
*/
export { typeDefs };