1
1
module . exports = ( sequelize , DataTypes ) => {
2
2
return sequelize . define (
3
- 'PhoneNumbers' , // Leave as non-spaced word
3
+ 'PhoneNumbers' ,
4
4
{
5
- // The issue seems to be limited to the constraints. For future reference, here is a link to the docs:
6
- // https://sequelize.org/docs/v7/core-concepts/validations-and-constraints/
7
- // TODO: Delete me! - There can only be one primary key
8
5
9
6
phoneNumberId :{
10
7
type : DataTypes . INTEGER ,
@@ -16,11 +13,7 @@ module.exports = (sequelize, DataTypes) => {
16
13
alias : 'Phone Number ID' ,
17
14
aliasValue : 'phoneNumberId' ,
18
15
} ,
19
-
20
- // TODO: Delete me! - Removing primary key from all other attributes will fix it
21
- // TODO: Delete me! - There is another issue. autoIncrement will do a +1 in the SQL table.
22
- // TODO: Delete me! - Since this is a reference to driverID/elderID, we don't want that (we want to specify the ID manually)
23
- // TODO: Delete me! - So, we can remove the autoIncrement as well. Additionally, this should be an int
16
+
24
17
referenceId :{
25
18
type : DataTypes . INTEGER ,
26
19
allowNull : false ,
@@ -30,7 +23,6 @@ module.exports = (sequelize, DataTypes) => {
30
23
aliasValue : 'referenceId' ,
31
24
} ,
32
25
33
- // TODO: Delete me! - If an attribute is empty, leave it commented out until you know what to do with it.
34
26
// referenceType:{
35
27
36
28
// },
@@ -72,7 +64,7 @@ module.exports = (sequelize, DataTypes) => {
72
64
} ,
73
65
} ,
74
66
{
75
- tableName : "PhoneNumbers" , // leave as non-spaced word
67
+ tableName : "PhoneNumbers" ,
76
68
timeStamps : false ,
77
69
}
78
70
)
0 commit comments