theater.model.js 634 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import Sequelize from "sequelize";

const { DataTypes } = Sequelize;

const TheaterModel = (sequelize) => {
    const Theater = sequelize.define(
        "theater",
        {
            theaterNum: {
                type: DataTypes.INTEGER,
                primaryKey: true,
            },
            rows: {
14
                type: DataTypes.INTEGER,
Kim, Subin's avatar
Kim, Subin committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
            },
            columns: {
                type: DataTypes.INTEGER,
            }
        },
        {
            timestamps: true,
            freezeTableName: true,
            tableName: "theaters"
        }
    );
    return Theater;
};

export default TheaterModel;