43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
import mongoose from "mongoose";
|
|
|
|
const propertySchema = mongoose.Schema({
|
|
address: {type: String, required: true },
|
|
city: {type: String, required: true },
|
|
state: {type: String, required: true },
|
|
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 },
|
|
propertyType: {type: String, required: true },
|
|
title: {type: String, required: true },
|
|
yearBuild: {type: String, required: true },
|
|
totalSqft: {type: String, required: true },
|
|
userfirstname: String,
|
|
usermiddlename: String,
|
|
userlastname: String,
|
|
usertitle: String,
|
|
creator: String,
|
|
useremail: String,
|
|
propertyId: String,
|
|
userId:String,
|
|
createdAt: {
|
|
type: Date,
|
|
default: new Date(),
|
|
},
|
|
publishedAt: {
|
|
type: Date,
|
|
default: new Date(),
|
|
},
|
|
currentYear: {
|
|
type: Number,
|
|
default: new Date().getFullYear(),
|
|
},
|
|
|
|
});
|
|
|
|
|
|
const PropertyModal = mongoose.model("property", propertySchema);
|
|
|
|
export default PropertyModal;
|