randydev commited on
Commit
f85a4dc
·
verified ·
1 Parent(s): 52ff43d

Update models.js

Browse files
Files changed (1) hide show
  1. models.js +3 -3
models.js CHANGED
@@ -1,13 +1,13 @@
1
  import mongoose from "mongoose";
2
 
3
  const apiKeySchema = new mongoose.Schema({
4
- key: { type: String, required: true, unique: true },
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, index: { expires: 0 } },
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