27 lines
472 B
JavaScript
27 lines
472 B
JavaScript
const { DataTypes } = require("sequelize");
|
|
const sequelize = require("../config/db");
|
|
|
|
const Item = sequelize.define(
|
|
"Item",
|
|
{
|
|
id: {
|
|
type: DataTypes.STRING,
|
|
primaryKey: true,
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
},
|
|
texturePath: {
|
|
type: DataTypes.STRING,
|
|
},
|
|
rarity: {
|
|
type: DataTypes.STRING,
|
|
defaultValue: "common",
|
|
},
|
|
},
|
|
{ tableName: "items" },
|
|
);
|
|
|
|
module.exports = Item;
|