const mongoose = require('mongoose');

const customerSchema = new mongoose.Schema({
  name: { type: String, required: true },
  email: { type: String, unique: true, sparse: true },
  phone: { type: String, required: true },
  address: String,
  company: String,
  contact_person: String,
  status: { type: String, enum: ['active','inactive'], default: 'active' },
}, { timestamps: true });

module.exports = mongoose.model('Customer', customerSchema);
