Reorganize app workspaces and align Admin architecture

This commit is contained in:
Igor Martyniuk
2026-07-17 13:46:21 +00:00
parent ba691d3a0c
commit 0ba01cd111
183 changed files with 3745 additions and 4354 deletions
@@ -0,0 +1,29 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'admins'
async up() {
await this.schema.raw('DROP TYPE IF EXISTS admin_status_enum')
this.schema.createTable(this.tableName, (table) => {
table.increments('id').notNullable()
table.string('email').notNullable().unique()
table.string('password').notNullable()
table.string('first_name').nullable()
table.string('last_name').nullable()
table
.enu('status', ['active', 'inactive'], {
useNative: true,
enumName: 'admin_status_enum',
})
.notNullable()
.defaultTo('active')
table.timestamp('created_at').notNullable()
table.timestamp('updated_at').nullable()
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}