add order form page models, reorder landing models (#8)
This commit is contained in:
parent
440e87ef76
commit
b79c957779
@ -1,3 +1 @@
|
|||||||
export * from './i18n';
|
export * from './i18n';
|
||||||
export * as Order from './order';
|
|
||||||
export * as Review from './review';
|
|
18
src/models/landing/car.ts
Normal file
18
src/models/landing/car.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
export type RegistrationNumber = string; // А012ВЕ
|
||||||
|
|
||||||
|
export type Color = string; // #000000
|
||||||
|
|
||||||
|
export const enum BodyStyle {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
SEDAN = 1,
|
||||||
|
HATCHBACK = 2,
|
||||||
|
CROSSOVER = 3,
|
||||||
|
SUV = 4,
|
||||||
|
STATION_WAGON = 5,
|
||||||
|
COUPE = 6,
|
||||||
|
MINIVAN = 7,
|
||||||
|
PICKUP = 8,
|
||||||
|
LIFTBACK = 9,
|
||||||
|
SPORTS_CAR = 10,
|
||||||
|
OTHER = 99
|
||||||
|
}
|
1
src/models/landing/customer.ts
Normal file
1
src/models/landing/customer.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export type PhoneNumber = string; // +79876543210
|
@ -1 +1,6 @@
|
|||||||
|
export * as Car from './car';
|
||||||
|
export * as Customer from './customer';
|
||||||
|
export * as Washing from './washing';
|
||||||
|
export * as Order from './order'; // import: Car, Customer, Washing
|
||||||
|
export * as Review from './review';
|
||||||
export * from './stubs';
|
export * from './stubs';
|
23
src/models/landing/order.ts
Normal file
23
src/models/landing/order.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { Car, Customer, Washing } from ".";
|
||||||
|
|
||||||
|
export type Id = string;
|
||||||
|
|
||||||
|
export type Create = {
|
||||||
|
customer: {
|
||||||
|
phone: Customer.PhoneNumber,
|
||||||
|
};
|
||||||
|
car: {
|
||||||
|
number: Car.RegistrationNumber,
|
||||||
|
body: Car.BodyStyle,
|
||||||
|
color: Car.Color,
|
||||||
|
},
|
||||||
|
washing: {
|
||||||
|
location: Washing.Location
|
||||||
|
begin: Washing.AvailableBeginDateTime,
|
||||||
|
end: Washing.AvailableEndDateTime,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export type View = {
|
||||||
|
id: Id;
|
||||||
|
};
|
5
src/models/landing/washing.ts
Normal file
5
src/models/landing/washing.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export type Location = string; // ?
|
||||||
|
|
||||||
|
export type AvailableBeginDateTime = string; // YYYY-MM-DDThh:mm
|
||||||
|
|
||||||
|
export type AvailableEndDateTime = string; // YYYY-MM-DDThh:mm
|
@ -1,5 +0,0 @@
|
|||||||
export type Id = string;
|
|
||||||
|
|
||||||
export type View = {
|
|
||||||
id: Id;
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user