Files
yourpart3/backend/models/community/push_notification_device.js

15 lines
559 B
JavaScript

import { sequelize } from '../../utils/sequelize.js';
import { DataTypes } from 'sequelize';
export default sequelize.define('push_notification_device', {
userId: { type: DataTypes.INTEGER, allowNull: false },
token: { type: DataTypes.TEXT, allowNull: false, unique: true },
platform: { type: DataTypes.STRING(20), allowNull: false, defaultValue: 'android' },
enabled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true },
}, {
tableName: 'push_notification_device',
schema: 'community',
underscored: true,
timestamps: true,
});