feat: 添加许可证密钥管理功能,更新许可证激活逻辑,支持环境变量配置,增加Docker支持
This commit is contained in:
19
server/models/LicenseKey.js
Normal file
19
server/models/LicenseKey.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const licenseKeySchema = new mongoose.Schema({
|
||||
licenseKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
unique: true
|
||||
},
|
||||
isUsed: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
generatedAt: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('LicenseKey', licenseKeySchema);
|
||||
Reference in New Issue
Block a user