import { PropertyAgeStatus } from '@/shared/constants/enum.constant';
import { Schema } from 'mongoose';

export const SellLeadSchema = new Schema({
  propertyCategory: { type: String },
  propertySize: {
    type: Schema.Types.Decimal128,
    get: (v) => (v ? parseFloat(v.toString()) : v),
  },
  propertyBedrooms: { type: String },
  furnishingStatus: String,
  propertyAge: {
    type: String,
    enum: Object.values(PropertyAgeStatus),
  },
  askingPrice: {
    type: Schema.Types.Decimal128,
    get: (v) => (v ? parseFloat(v.toString()) : v),
  },
});
