You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
518 B
18 lines
518 B
// auth-token.js
|
|
// Copyright (C) 2024 DTP Technologies, LLC
|
|
// All Rights Reserved
|
|
|
|
'use strict';
|
|
|
|
import mongoose from 'mongoose';
|
|
const Schema = mongoose.Schema;
|
|
|
|
const AuthTokenSchema = new Schema({
|
|
created: { type: Date, default: Date.now, required: true, index: 1, expires: '7d' },
|
|
claimed: { type: Date },
|
|
purpose: { type: String, required: true },
|
|
token: { type: String, required: true, index: 1 },
|
|
data: { type: Schema.Types.Mixed },
|
|
});
|
|
|
|
export default mongoose.model('AuthToken', AuthTokenSchema);
|