workend on update and create employee functions + validator

This commit is contained in:
Sockenklaus
2021-10-17 01:07:29 +02:00
parent 93e2b9c445
commit 43ee300bd2
5 changed files with 230 additions and 19 deletions

View File

@@ -12,9 +12,9 @@ export default class Employees extends BaseSchema {
*/
table.timestamp('created_at', { useTz: true })
table.timestamp('updated_at', { useTz: true })
table.string('first_name ')
table.string('first_name').notNullable()
table.string('last_name')
table.string('shorthand').unique()
table.string('shorthand').unique().notNullable()
table.string('email')
table.string('phone')
table.string('mobile')