feat: separate db models from server

This commit is contained in:
wancat committed 2023-10-14 15:34:46 +08:00
1 parent 784ae29ed0
commit 50bf514805
23 files changed
+90 -31

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { model } from 'mongoose'
const User = model('User', {
username: {
type: String,
unique: true,
required: true,
},
email: {
type: String,
unique: true,
required: true,
},
hashedPassword: String,
google: {
id: String,
displayName: String,
},
github: {
id: String,
displayName: String,
},
})
export default User