migrate JavaScript to TypeScript

This commit is contained in:
tdurieux
2021-08-11 18:18:45 +02:00
parent ee4a20286d
commit caeff49ab0
58 changed files with 6034 additions and 3096 deletions

View 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;