blob: e39f66709be9de80e867448227d5f62076ac5ff6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { Document, Schema } from "mongoose"
export interface User {
name: string;
avatarUrl?: string;
age?: number;
}
export interface UserSchema extends Document, User {}
export const userSchema = new Schema({
name: String,
avatarUrl: {
type: String,
required: false
},
age: {
type: Number
}
});
|