ticketfee.model.js 1.27 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
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
import Sequelize from "sequelize";

const { DataTypes } = Sequelize;

const TicketFeeModel = (sequelize) => {
    const TicketFee = sequelize.define(
        "ticketfee",
        {
            id: {
                type: DataTypes.INTEGER,
                primaryKey: true,
                autoIncrement: true,
            },
            theaterType: {
                type: DataTypes.STRING
            },
            weekdays: {
                type: DataTypes.INTEGER
            },
            weekend: {
                type: DataTypes.INTEGER
            },
            morning: {
                type: DataTypes.INTEGER
            },
            day: {
                type: DataTypes.INTEGER
            },
            night: {
                type: DataTypes.INTEGER
            },
            youth: {
                type: DataTypes.INTEGER
            },
            adult: {
                type: DataTypes.INTEGER
            },
            senior: {
                type: DataTypes.INTEGER
            },
            defaultPrice: {
                type: DataTypes.INTEGER,
            }
        },
        {
            timestamps: true,
            freezeTableName: true,
            tableName: "ticketfees"
        }
    );
    return TicketFee;
};

export default TicketFeeModel;