Skip to content

Commit

Permalink
edit tree schema type
Browse files Browse the repository at this point in the history
  • Loading branch information
kaseyliu committed Jan 30, 2025
1 parent 55ad5d0 commit 48e3961
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/database/treeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import mongoose, { Decimal128, Schema } from "mongoose";
export type ITree = {
_id: string;
collectorName: string;
dateCollected: string;
gpsCoordinates: string;
photo: string;
dateCollected: Date;
gpsCoordinates: Decimal128[];
photo?: string;
dbh: Decimal128;
canopyBreadth: Decimal128;
species: string;
treeCondition: string[];
additionalNotes: string;
additionalNotes?: string;
};

const TreeSchema = new Schema<ITree>({
collectorName: { type: String, required: true },
dateCollected: { type: String, required: true },
gpsCoordinates: { type: String, required: true },
dateCollected: { type: Date, required: true },
gpsCoordinates: { type: [mongoose.Types.Decimal128], required: true },
photo: { type: String, required: false },
dbh: { type: mongoose.Types.Decimal128, required: true },
canopyBreadth: { type: mongoose.Types.Decimal128, required: true },
Expand Down

0 comments on commit 48e3961

Please sign in to comment.