const { DataTypes } = require("sequelize");
const { db } = require("../utils");

const Plan = db.define("plans", {
  id: {
    type: DataTypes.INTEGER,
    autoIncrement: true,
    primaryKey: true,
  },
  type: {
    type: DataTypes.STRING,
    defaultValue: "property",
  },
  name: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  description: {
    type: DataTypes.TEXT,
    allowNull: false,
  },
  amount: {
    type: DataTypes.FLOAT,
    defaultValue: 0,
  },
  noOfDays: {
    type: DataTypes.INTEGER,
    defaultValue: 0,
  },
});

module.exports = Plan;
