-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbet_primary.js
More file actions
More file actions
Latest commit
47 lines (46 loc) · 986 Bytes
/
Copy pathbet_primary.js
File metadata and controls
47 lines (46 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module.exports = function(sequelize, Sequelize) {
var BetPrimary = sequelize.define('bet_primary', {
id: {
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
user_id: {
type: Sequelize.INTEGER,
notEmpty: true
},
question_id: {
type: Sequelize.INTEGER,
notEmpty: true
},
option: {
type: Sequelize.ENUM('yes', 'no'),
notEmpty: true
},
odds_numerator: {
type: Sequelize.INTEGER,
notEmpty: true
},
odds_denominator: {
type: Sequelize.INTEGER,
notEmpty: true
},
amount: {
type: Sequelize.INTEGER, // TODO accept float
notEmpty: true
},
available_amount: {
type: Sequelize.INTEGER, // TODO accept float
notEmpty: true
},
settled: {
type: Sequelize.BOOLEAN,
defaultValue: false
},
resolved: {
type: Sequelize.BOOLEAN,
defaultValue: false
}
});
return BetPrimary;
}