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 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:However, the front-end model for
School
is currently:We need to sync up these models: