mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix mongoose ecosystem guid (#4740)
Fix missing method declaration on schema and Schema database name from Kitten to Animal
This commit is contained in:
@@ -33,11 +33,18 @@ const animalSchema = new mongoose.Schema(
|
||||
{
|
||||
name: {type: String, required: true},
|
||||
sound: {type: String, required: true},
|
||||
},
|
||||
{
|
||||
methods: {
|
||||
speak() {
|
||||
console.log(`${this.sound}!`);
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
export type Animal = mongoose.InferSchemaType<typeof animalSchema>;
|
||||
export const Animal = mongoose.model('Kitten', animalSchema);
|
||||
export const Animal = mongoose.model('Animal', animalSchema);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user