joven-health-mike / juno-react

A virtual therapy platform designed for K-12 schools.
0 stars 0 forks source link

Sync up model types #43

Closed joven-health-mike closed 1 year ago

joven-health-mike commented 2 years ago

We need to make sure the types we have set up on the front-end match what's going to be returned by the backend.

For example, the backend has the following information for the School model:

model School {
  id           Int                  @id @default(autoincrement())
  name         String
  address      String?
  state        String?
  zip          String?
  primaryEmail String?
  primaryPhone String?
  schoolAdmins SchoolAdminDetails[] @relation(name: "SchoolAdminSchool")
  schoolStaff  SchoolStaffDetails[] @relation(name: "SchoolStaffSchool")
  students     StudentDetails[]     @relation(name: "StudentSchool")
}

However, the front-end model for School is currently:

export type School = {
  _id: number;
  name: string;
  email: string;
};

We need to sync up these models: