import { DataTypes } from 'sequelize';

export default function defineService(sequelize) {
  return sequelize.define(
    'Service',
    {
      id: { type: DataTypes.BIGINT.UNSIGNED, primaryKey: true, autoIncrement: true },
      name: { type: DataTypes.STRING(120), allowNull: false, unique: true },
      price: { type: DataTypes.DECIMAL(10, 2), allowNull: false },
    },
    { tableName: 'services' }
  );
}
