mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-14 11:22:44 +00:00
migrate JavaScript to TypeScript
This commit is contained in:
36
src/database/users/users.schema.ts
Normal file
36
src/database/users/users.schema.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as mongoose from "mongoose";
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const UserSchema = new Schema({
|
||||
accessToken: String,
|
||||
username: {
|
||||
type: String,
|
||||
index: { unique: true },
|
||||
},
|
||||
email: String,
|
||||
photo: String,
|
||||
repositories: [String],
|
||||
default: {
|
||||
terms: [String],
|
||||
options: {
|
||||
expirationMode: { type: String },
|
||||
update: Boolean,
|
||||
image: Boolean,
|
||||
pdf: Boolean,
|
||||
notebook: Boolean,
|
||||
loc: Boolean,
|
||||
link: Boolean,
|
||||
page: { type: String },
|
||||
},
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
default: "active",
|
||||
},
|
||||
dateOfEntry: {
|
||||
type: Date,
|
||||
default: new Date(),
|
||||
},
|
||||
});
|
||||
|
||||
export default UserSchema;
|
||||
Reference in New Issue
Block a user