upd
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import { model, Schema } from "mongoose";
|
||||
|
||||
const unitSchema = new Schema(
|
||||
{
|
||||
propertyName: {
|
||||
type: String,
|
||||
},
|
||||
projectName: {
|
||||
type: String,
|
||||
},
|
||||
floor: {
|
||||
type: Number,
|
||||
},
|
||||
unitNo: {
|
||||
type: String,
|
||||
},
|
||||
propertyStatus: {
|
||||
type: String,
|
||||
},
|
||||
unitType: {
|
||||
type: String,
|
||||
},
|
||||
unitView: {
|
||||
type: String,
|
||||
},
|
||||
furnished: {
|
||||
type: String,
|
||||
},
|
||||
totalArea: {
|
||||
type: Number,
|
||||
},
|
||||
suiteArea: {
|
||||
type: Number,
|
||||
},
|
||||
balconyArea: {
|
||||
type: Number,
|
||||
},
|
||||
bedrooms: {
|
||||
type: Number,
|
||||
},
|
||||
bathrooms: {
|
||||
type: Number,
|
||||
},
|
||||
parkingSpaces: {
|
||||
type: Number,
|
||||
},
|
||||
unitPrice: {
|
||||
type: Number,
|
||||
},
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
toJSON: { virtuals: true },
|
||||
toObject: { virtuals: true },
|
||||
}
|
||||
);
|
||||
|
||||
const Unit = model("Unit", unitSchema);
|
||||
|
||||
export default Unit;
|
||||
Reference in New Issue
Block a user