Skip to content

Instantly share code, notes, and snippets.

@JhonatanHern
Created November 17, 2022 21:29
Show Gist options
  • Save JhonatanHern/e88b9ef75d86ea0330bb14b76793c876 to your computer and use it in GitHub Desktop.
Save JhonatanHern/e88b9ef75d86ea0330bb14b76793c876 to your computer and use it in GitHub Desktop.
type retailClient = {
id: Number,
fName: String,
lName: String,
email: String,
phone: String,
instaTowClientId: Number,
retailVehicles: Number[],
}
type TowTruckCompany = {
id: Number,
add1: String,
add2: String,
city: String,
state: String,
postcode: Number,
supportPhone: Number,
signedTowingAgreement: boolean,
towTruckDrivers: Number[],
}
type InsuranceCompany = {
id: Number,
add1: String,
add2: String,
city: String,
state: String,
postcode: Number,
supportPhone: Number,
signedInsuranceAgreement: boolean
}
type Coupon = {
insuranceCompanyId: Number,
limitAmount: Number,
towJobId: Number,
}
type InstatowAdmin = {
// email, pw, etc.
}
type TowTruckCompanyAgent = {
// email, pw, etc.
towTruckCompanyId: Number,
}
type InsuranceCompanyAgent = {
// email, pw, etc.
insuranceCompanyId: Number,
}
type towTruckDriver = {
id: Number,
towTruckCompanyID: Number
fName: String,
lName: String,
driversLicence: String,
towTruckLicencePlate: String,
phone: Number,
email: String,
towTrucks: Number[],
towTruckCompanies: Number[],
}
type retailVehicle = {
id: Number,
make: String, // DROPDOWN: We could find a schema that includes all vehicles.
model: String,
year: Date, // Just the year component of date and time schema
colour: String,
licencePlate: String,
retailClients: Number[],
}
type towTruck = {
id: Number,
make: String, // DROPDOWN: We could find a schema that includes all vehicles.
model: String,
year: Date, // Just the year component of date and time schema
colour: String,
licencePlate: String,
currentDriver: towTruckDriver["instaTowDriverId"],
towTruckDrivers: Number[],
}
type jobType = ["Retail", "Commerical"]
type jobStatus = ["PendingPayment", "PaymentMade-AwaitingTowTruckAssigned", "TowDriverAssigned", "TowDriverArrivedOnJob", "Towing", "JobFinished" ]
type towJob = {
id: Number,
couponId: Number,
retailClientId: Number
jobStatus: jobStatus,
towTruckDriverId: Number
retailVehicleId: Number
pickupLocation: Address
dropOffLocation: Address
exactDropoff: Address
}
type Address = {
identifyingFeatures: String,
geolocation: {
longitude: Number
lattitude: Number
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment