This commit is contained in:
@@ -2,24 +2,24 @@ import { InferSchemaType, Schema, Types } from 'mongoose';
|
||||
import { STRATEGIES } from '../constants/strategies';
|
||||
|
||||
export const Strategy = new Schema(
|
||||
{
|
||||
method: {
|
||||
type: Number,
|
||||
enum: Object.values(STRATEGIES),
|
||||
index: true,
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
externalId: { type: String, index: true },
|
||||
key: { type: String, required: true, trim: true },
|
||||
profile: {},
|
||||
resetToken: { type: String },
|
||||
forceReset: { type: Boolean },
|
||||
},
|
||||
{
|
||||
minimize: true,
|
||||
timestamps: true,
|
||||
{
|
||||
method: {
|
||||
type: Number,
|
||||
enum: Object.values(STRATEGIES),
|
||||
index: true,
|
||||
required: true,
|
||||
unique: true
|
||||
},
|
||||
externalId: { type: String, index: true },
|
||||
key: { type: String, required: true, trim: true },
|
||||
profile: {},
|
||||
resetToken: { type: String },
|
||||
forceReset: { type: Boolean }
|
||||
},
|
||||
{
|
||||
minimize: true,
|
||||
timestamps: true
|
||||
}
|
||||
);
|
||||
|
||||
export type Strategy = InferSchemaType<typeof Strategy>;
|
||||
|
||||
Reference in New Issue
Block a user