text: const mongoose = require("mongoose");
  
  const userSchema = new mongoose.Schema({
    name: {
      type: String,
      required: true,
      min: 3,
      max: 255,
    },
    surname: {
      type: String,
      required: true,
      min: 2,
      max: 255,
    },
    email: {
      type: String,
      required: true,
      min: 6,
      max: 255,
    },
    password: {
      type: String,
      required: true,
      min: 3,
      max: 1024,
    },
    date: { 
      type: Date,
      default: Date.now,
    },
    type: {
      type: String,
      required: true,
      min: 4,
      max: 255,
    },
  });
  
  module.exports = mongoose.model("User", userSchema);
  