Update models.js
Browse files
models.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import mongoose from "mongoose";
|
2 |
|
3 |
const apiKeySchema = new mongoose.Schema({
|
4 |
-
|
5 |
-
owner: { type: Number, required: true },
|
6 |
is_banned: { type: Boolean, default: false },
|
7 |
email: { type: String },
|
8 |
createdAt: { type: Date, default: Date.now },
|
9 |
type: { type: String, enum: ["free", "premium"], default: "free" },
|
10 |
-
expiresAt: { type: Date, required: true
|
11 |
is_expired: { type: Boolean, default: false }
|
12 |
});
|
13 |
|
|
|
1 |
import mongoose from "mongoose";
|
2 |
|
3 |
const apiKeySchema = new mongoose.Schema({
|
4 |
+
api_keys: { type: String, required: true, unique: true },
|
5 |
+
owner: { type: Number, required: true, unique: true },
|
6 |
is_banned: { type: Boolean, default: false },
|
7 |
email: { type: String },
|
8 |
createdAt: { type: Date, default: Date.now },
|
9 |
type: { type: String, enum: ["free", "premium"], default: "free" },
|
10 |
+
expiresAt: { type: Date, required: true },
|
11 |
is_expired: { type: Boolean, default: false }
|
12 |
});
|
13 |
|