Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fahrtenbuch
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWP WS21_22 - Fahrtenbuch
Team Einhorn
fahrtenbuch
Commits
2c007464
Commit
2c007464
authored
3 years ago
by
elit04
Browse files
Options
Downloads
Patches
Plain Diff
CheckIn+Customer tables merged into CheckIn table in DB
parent
73667db9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/src/db/models/CheckIn.ts
+28
-24
28 additions, 24 deletions
server/src/db/models/CheckIn.ts
with
28 additions
and
24 deletions
server/src/db/models/CheckIn.ts
+
28
−
24
View file @
2c007464
...
...
@@ -3,24 +3,26 @@ import { DataTypes, Model, Optional , Sequelize} from "sequelize";
interface
CheckInAttributes
{
id
:
string
;
checkin
:
Date
;
checkout
:
Date
;
clientID
:
string
;
startTime
:
Date
;
estimatedEndTime
:
Date
;
email
:
string
;
firstName
:
string
;
lastName
:
string
;
additionalClients
:
Array
<
string
>
;
boatID
:
string
;
destination
:
string
;
note
:
string
;
}
export
interface
CheckInAttributesInput
extends
Optional
<
CheckInAttributes
,
"
id
"
>
{
}
class
CheckIn
extends
Model
<
CheckInAttributes
,
CheckInAttributesInput
>
implements
CheckInAttributes
{
declare
id
:
string
;
declare
checkin
:
Date
;
declare
checkout
:
Date
;
declare
clientID
:
string
;
declare
startTime
:
Date
;
declare
estimatedEndTime
:
Date
;
declare
email
:
string
;
declare
firstName
:
string
;
declare
lastName
:
string
;
declare
additionalClients
:
Array
<
string
>
;
declare
boatID
:
string
;
declare
destination
:
string
;
declare
note
:
string
;
declare
readonly
createdAt
:
Date
;
declare
readonly
updatedAt
:
Date
;
...
...
@@ -35,20 +37,28 @@ export const initCheckIn = async (sequelizeConnection: Sequelize) => {
primaryKey
:
true
,
allowNull
:
false
,
},
checkin
:
{
startTime
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
},
checkout
:
{
estimatedEndTime
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
},
clientID
:
{
type
:
DataTypes
.
UUID
,
references
:
{
model
:
"
customer
"
,
key
:
"
id
"
,
},
email
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
},
firstName
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
},
lastName
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
},
additionalClients
:
{
type
:
new
DataTypes
.
ARRAY
(
DataTypes
.
STRING
),
},
boatID
:
{
type
:
DataTypes
.
UUID
,
...
...
@@ -57,12 +67,6 @@ export const initCheckIn = async (sequelizeConnection: Sequelize) => {
key
:
"
id
"
,
},
},
destination
:
{
type
:
new
DataTypes
.
STRING
(),
},
note
:
{
type
:
new
DataTypes
.
STRING
(),
},
},
{
tableName
:
"
checkin
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment