act_wheel_surf_prize.js 1.48 KB
/* eslint new-cap: "off" */
const options = require('../model-opts');

module.exports = function(Sequelize, DataTypes) {
    const ActWheelSurfPrize = Sequelize.define('ActWheelSurfPrize', {
        id: {
            type: DataTypes.INTEGER(8),
            allowNull: false,
            primaryKey: true,
            autoIncrement: true
        },
        act_id: {
            type: DataTypes.INTEGER(8),
            allowNull: false
        },
        name: {
            type: DataTypes.STRING(50),
            allowNull: true
        },
        type: {
            type: DataTypes.INTEGER(2),
            allowNull: true
        },
        value: {
            type: DataTypes.STRING(200),
            allowNull: true
        },
        img: {
            type: DataTypes.STRING(300),
            allowNull: true
        },
        total: {
            type: DataTypes.INTEGER(8),
            allowNull: false,
            defaultValue: 0
        },
        total_left: {
            type: DataTypes.INTEGER(8),
            allowNull: false,
            defaultValue: 0
        },
        chance: {
            type: DataTypes.FLOAT,
            allowNull: true
        },
        prize_idx: {
            type: DataTypes.INTEGER(2),
            allowNull: false,
            defaultValue: 0
        },
        create_time: {
            type: DataTypes.DATE,
            defaultValue: Sequelize.NOW
        }
    }, Object.assign(options, {tableName: 'act_wheel_surf_prize'}));

    return ActWheelSurfPrize;
};