Skip to content

Commit

Permalink
Merge pull request #11 from hack4impact-calpoly/7-create-tree-schema
Browse files Browse the repository at this point in the history
create tree schema
  • Loading branch information
elhagen13 authored Jan 25, 2025
2 parents 9c82bbc + 2c4cad9 commit 9602c84
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/database/treeSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import mongoose, { Schema } from "mongoose";

const TreeSchema = new Schema({});
const TreeSchema = new Schema({
collectorName: { type: String, required: true },
dateCollected: { type: String, required: true },
gpsCoordinates: { type: String, required: true },
photo: { type: String, required: false },
dbh: { type: mongoose.Types.Decimal128, required: true },
canopyBreadth: { type: mongoose.Types.Decimal128, required: true },
species: { type: String, required: true },
treeCondition: { type: [String], required: true },
additionalNotes: {
type: String,
required: false,
},
});

export default mongoose.model("Tree", TreeSchema);

0 comments on commit 9602c84

Please sign in to comment.