-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_films.js
57 lines (56 loc) · 1.34 KB
/
model_films.js
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
48
49
50
51
52
53
54
55
56
57
//import { Sequelize } from "sequelize";
const Sequelize = require("sequelize");
module.exports = (sequelize) => {
const Film = sequelize.define("film", {
film_id: {
type: Sequelize.INTEGER,
autoIncrement: true,
primaryKey: true,
allowNull: false
},
title: {
type: Sequelize.STRING,
allowNull: false
},
description: {
type: Sequelize.TEXT
},
release_year: {
type: Sequelize.INTEGER
},
language_id: {
type: Sequelize.INTEGER,
allowNull: false
},
rental_duration: {
type: Sequelize.INTEGER,
allowNull: false
},
rental_rate: {
type: Sequelize.FLOAT,
allowNull: false
},
length: {
type: Sequelize.INTEGER
},
replacement_cost: {
type: Sequelize.STRING,
allowNull: false
},
rating: {
type: Sequelize.STRING
},
last_update: {
type: Sequelize.DATE,
allowNull: false
},
special_features: {
type: Sequelize.JSON
},
fulltext: {
type: Sequelize.STRING,
allowNull: false
}
});
return Film;
};