Skip to content
Snippets Groups Projects
Commit 238838db authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files

fullNameOfResponsableClient instead of (firstName+lastName).

parent 46a63beb
No related branches found
No related tags found
No related merge requests found
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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment