Skip to content

Commit

Permalink
fix: added type to tree schema
Browse files Browse the repository at this point in the history
  • Loading branch information
kaseyliu committed Jan 30, 2025
1 parent c5bea6e commit df3428f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/database/treeSchema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import mongoose, { Schema } from "mongoose";
import mongoose, { Decimal128, Schema } from "mongoose";

const TreeSchema = new Schema({
export type ITree = {
_id: string;
collectorName: string;
dateCollected: string;
gpsCoordinates: string;
photo: string;
dbh: Decimal128;
canopyBreadth: Decimal128;
species: string;
treeCondition: string[];
additionalNotes: string;
};

const TreeSchema = new Schema<ITree>({
collectorName: { type: String, required: true },
dateCollected: { type: String, required: true },
gpsCoordinates: { type: String, required: true },
Expand Down

0 comments on commit df3428f

Please sign in to comment.