estatesfunding/ef-api/models/property.js

43 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-09-12 08:11:07 +00:00
import mongoose from "mongoose";
const propertySchema = mongoose.Schema({
2024-09-23 16:34:21 +00:00
address: {type: String, required: true },
city: {type: String, required: true },
state: {type: String, required: true },
2024-09-23 17:26:24 +00:00
county: {type: String, required: true },
zip: {type: String, required: true },
parcel: {type: String, required: true },
subdivision: {type: String, required: true },
legal: {type: String, required: true },
2024-09-12 08:11:07 +00:00
propertyType: {type: String, required: true },
title: {type: String, required: true },
yearBuild: {type: String, required: true },
totalSqft: {type: String, required: true },
2024-09-16 05:54:57 +00:00
userfirstname: String,
usermiddlename: String,
userlastname: String,
usertitle: String,
2024-09-16 05:00:05 +00:00
creator: String,
2024-09-16 05:54:57 +00:00
useremail: String,
2024-09-16 05:00:05 +00:00
propertyId: String,
2024-09-16 05:54:57 +00:00
userId:String,
2024-09-16 05:00:05 +00:00
createdAt: {
type: Date,
default: new Date(),
},
publishedAt: {
type: Date,
default: new Date(),
},
currentYear: {
type: Number,
default: new Date().getFullYear(),
},
2024-09-15 08:11:03 +00:00
2024-09-12 08:11:07 +00:00
});
const PropertyModal = mongoose.model("property", propertySchema);
export default PropertyModal;