Download packages/data-schemas/src/models/user.ts from helloya20/chat: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/spaces/helloya20/chat/resolve/main/packages/data-schemas/src/models/user.ts
- Command line
-
hf download hf://spaces/helloya20/chat/packages/data-schemas/src/models/user.ts
-
curl -L -o user.ts https://huggingface.co/spaces/helloya20/chat/resolve/main/packages/data-schemas/src/models/user.ts
320 Bytes
| import userSchema from '~/schema/user'; | |
| import type * as t from '~/types'; | |
| /** | |
| * Creates or returns the User model using the provided mongoose instance and schema | |
| */ | |
| export function createUserModel(mongoose: typeof import('mongoose')) { | |
| return mongoose.models.User || mongoose.model<t.IUser>('User', userSchema); | |
| } | |