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
49bfb826
Commit
49bfb826
authored
3 years ago
by
elit04
Browse files
Options
Downloads
Patches
Plain Diff
Customer table deleted
parent
2c007464
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/Customer.ts
+0
-54
0 additions, 54 deletions
server/src/db/models/Customer.ts
with
0 additions
and
54 deletions
server/src/db/models/Customer.ts
deleted
100644 → 0
+
0
−
54
View file @
2c007464
import
{
DataTypes
,
Model
,
Optional
,
Sequelize
}
from
"
sequelize
"
;
interface
CustomerAttributes
{
id
:
string
;
firstName
:
string
;
lastName
:
string
;
email
:
string
;
}
export
interface
CustomerInput
extends
Optional
<
CustomerAttributes
,
"
id
"
>
{
}
class
Customer
extends
Model
<
CustomerAttributes
,
CustomerInput
>
implements
CustomerAttributes
{
declare
id
:
string
;
declare
firstName
:
string
;
declare
lastName
:
string
;
declare
email
:
string
;
declare
readonly
createdAt
:
Date
;
declare
readonly
updatedAt
:
Date
;
}
export
const
initCustomer
=
async
(
sequelizeConnection
:
Sequelize
)
=>
{
Customer
.
init
(
{
id
:
{
type
:
DataTypes
.
UUID
,
defaultValue
:
DataTypes
.
UUIDV4
,
primaryKey
:
true
,
allowNull
:
false
,
},
firstName
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
},
lastName
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
},
email
:
{
type
:
new
DataTypes
.
STRING
(),
allowNull
:
false
,
unique
:
true
,
},
},
{
tableName
:
"
customer
"
,
sequelize
:
sequelizeConnection
,
}
);
}
export
default
Customer
;
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