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