Add base payrate field for ranks

This commit is contained in:
Nabeel Shahzad
2018-02-26 17:56:30 -06:00
parent 4a73a5a6b3
commit f6ec647eb6
4 changed files with 26 additions and 9 deletions

View File

@@ -18,6 +18,7 @@ class CreateRanksTable extends Migration
$table->string('name', 50);
$table->string('image_link')->nullable();
$table->unsignedInteger('hours')->default(0);
$table->unsignedDecimal('base_pay_rate')->nullable()->default(0);
$table->boolean('auto_approve_acars')->nullable()->default(false);
$table->boolean('auto_approve_manual')->nullable()->default(false);
$table->boolean('auto_promote')->nullable()->default(true);

View File

@@ -75,14 +75,17 @@ ranks:
- id: 2
name: Junior First Officer
hours: 10
base_pay_rate: 100
- id: 3
name: First Officer
hours: 15
base_pay_rate: 250
auto_approve_acars: 1
auto_approve_manual: 1
- id: 4
name: Senior Captain
hours: 20
base_pay_rate: 500
auto_approve_acars: 1
auto_approve_manual: 1
auto_promote: 0

View File

@@ -14,6 +14,7 @@ class Rank extends BaseModel
'name',
'hours',
'image_link',
'base_pay_rate',
'auto_approve_acars',
'auto_approve_manual',
'auto_promote',
@@ -21,6 +22,7 @@ class Rank extends BaseModel
protected $casts = [
'hours' => 'integer',
'base_pay_rate' => 'float',
'auto_approve_acars' => 'bool',
'auto_approve_manual' => 'bool',
'auto_promote' => 'bool',
@@ -29,6 +31,7 @@ class Rank extends BaseModel
public static $rules = [
'name' => 'required',
'hours' => 'required|integer',
'base_pay_rate' => 'nullable|numeric',
];
public function subfleets() {