From 238838db5919b6c320449595bd87a311e4e9f71c Mon Sep 17 00:00:00 2001
From: Hanen Alrwasheda <alrwasheda@mi.fu-berlin.de>
Date: Sun, 16 Jan 2022 06:18:50 +0100
Subject: [PATCH] fullNameOfResponsableClient instead of (firstName+lastName).

---
 server/src/db/models/CheckIn.ts | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/server/src/db/models/CheckIn.ts b/server/src/db/models/CheckIn.ts
index 67ef320..503c209 100644
--- a/server/src/db/models/CheckIn.ts
+++ b/server/src/db/models/CheckIn.ts
@@ -1,28 +1,28 @@
-
-import { DataTypes, Model, Optional , Sequelize} from "sequelize";
+import { DataTypes, Model, Optional, Sequelize } from "sequelize";
 
 interface CheckInAttributes {
   id: string;
   startTime: Date;
   estimatedEndTime: Date;
   email: string;
-  firstName: string;
-  lastName: string;
+  fullNameOfResponsableClient: string;
   additionalClients: Array<string>;
-  boatID: string;
+  boatId: string;
 }
 export interface CheckInAttributesInput
-  extends Optional<CheckInAttributes, "id"> { }
+  extends Optional<CheckInAttributes, "id"> {}
 
-  class CheckIn extends Model<CheckInAttributes, CheckInAttributesInput> implements CheckInAttributes {
+class CheckIn
+  extends Model<CheckInAttributes, CheckInAttributesInput>
+  implements CheckInAttributes
+{
   declare id: string;
   declare startTime: Date;
   declare estimatedEndTime: Date;
   declare email: string;
-  declare firstName: string;
-  declare lastName: string;
+  declare fullNameOfResponsableClient: string;
   declare additionalClients: Array<string>;
-  declare boatID: string;
+  declare boatId: string;
 
   declare readonly createdAt: Date;
   declare readonly updatedAt: Date;
@@ -49,18 +49,14 @@ export const initCheckIn = async (sequelizeConnection: Sequelize) => {
         type: new DataTypes.STRING(),
         allowNull: false,
       },
-      firstName: {
-        type: new DataTypes.STRING(),
-        allowNull: false,
-      },
-      lastName: {
+      fullNameOfResponsableClient: {
         type: new DataTypes.STRING(),
         allowNull: false,
       },
       additionalClients: {
         type: new DataTypes.ARRAY(DataTypes.STRING),
       },
-      boatID: {
+      boatId: {
         type: DataTypes.UUID,
         references: {
           model: "boat",
@@ -72,7 +68,7 @@ export const initCheckIn = async (sequelizeConnection: Sequelize) => {
       tableName: "checkin",
       sequelize: sequelizeConnection,
     }
-    );
-}
+  );
+};
 
 export default CheckIn;
-- 
GitLab