Init commit

This commit is contained in:
2024-12-22 16:52:30 +03:30
parent 28ab698dfc
commit aeb38982ca
28 changed files with 1532 additions and 68 deletions
+18
View File
@@ -0,0 +1,18 @@
const Permission = require('./permissionModel')
const chalk = require('chalk')
const runSeeder = async () => {
const permissions = []
await Permission.deleteMany({})
console.log(chalk.red('Deleted all permission records.'))
await Permission.insertMany(permissions, null)
console.log(
chalk.green.bold(
`PERMISSION: Created ${permissions.length} permission(s)`
)
)
}
module.exports = { runSeeder }