first commit

This commit is contained in:
r2xrzh9q2z-lab
2026-02-02 11:07:09 +07:00
commit d1b931d547
286 changed files with 53992 additions and 0 deletions

28
models/migration.js Normal file
View File

@@ -0,0 +1,28 @@
const mongoose = require('mongoose');
const migrationSchema = new mongoose.Schema({
name: {
type: String,
required: true,
unique: true,
index: true
},
batch: {
type: Number,
required: true,
default: 1
},
ranAt: {
type: Date,
default: Date.now
}
}, {
timestamps: true
});
// Index để tìm kiếm nhanh
migrationSchema.index({ name: 1 });
migrationSchema.index({ batch: -1 });
module.exports = mongoose.model('Migration', migrationSchema);