CampFirePlay/models/location.model.js
Degradin b4087cf26c v5.5
Battle Update Prepare
2025-01-12 03:37:21 +03:00

39 lines
737 B
JavaScript

const { DataTypes } = require('sequelize');
const sequelize = require('../db');
const Location = sequelize.define('location', {
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true,
},
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.TEXT,
allowNull: false,
},
enemies: {
type: DataTypes.ARRAY(DataTypes.INTEGER),
allowNull: true,
defaultValue: []
},
level: {
type: DataTypes.INTEGER,
allowNull: false,
},
loot: {
type: DataTypes.ARRAY(DataTypes.INTEGER),
allowNull: true,
defaultValue: []
},
rarity: {
type: DataTypes.INTEGER,
allowNull: false,
},
});
module.exports = Location;