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

const Business = sequelize.define('business', {
    id: {type: DataTypes.INTEGER, primaryKey: true, unique: true, autoIncrement: true},
    name: {type: DataTypes.STRING, defaultValue: "Организация не найдена."},
    owner: {type: DataTypes.STRING, defaultValue: 0},
    balance: {type: DataTypes.INTEGER, defaultValue: 0},
    materials: {type: DataTypes.INTEGER, defaultValue: 0},
    users: {type: DataTypes.ARRAY(DataTypes.BIGINT)},
    checks: {type: DataTypes.INTEGER, defaultValue: 0}
})

module.exports = Business;
