add transfer time fields in user table #129

This commit is contained in:
Nabeel Shahzad
2018-01-30 12:31:59 -06:00
parent ec5478a766
commit ad90d1bccf
2 changed files with 9 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ class CreateUsersTable extends Migration
$table->string('last_pirep_id', 12)->nullable(); $table->string('last_pirep_id', 12)->nullable();
$table->unsignedBigInteger('flights')->default(0); $table->unsignedBigInteger('flights')->default(0);
$table->unsignedBigInteger('flight_time')->nullable()->default(0); $table->unsignedBigInteger('flight_time')->nullable()->default(0);
$table->unsignedBigInteger('transferred_time')->nullable()->default(0);
$table->decimal('balance', 19)->nullable(); $table->decimal('balance', 19)->nullable();
$table->string('timezone', 64)->nullable(); $table->string('timezone', 64)->nullable();
$table->unsignedTinyInteger('status')->nullable()->default(0); $table->unsignedTinyInteger('status')->nullable()->default(0);

View File

@@ -43,6 +43,7 @@ class User extends Authenticatable
'last_pirep_id', 'last_pirep_id',
'flights', 'flights',
'flight_time', 'flight_time',
'transferred_time',
'balance', 'balance',
'timezone', 'timezone',
'state', 'state',
@@ -55,16 +56,18 @@ class User extends Authenticatable
* The attributes that should be hidden for arrays. * The attributes that should be hidden for arrays.
*/ */
protected $hidden = [ protected $hidden = [
'api_key',
'password', 'password',
'remember_token', 'remember_token',
]; ];
protected $casts = [ protected $casts = [
'flights' => 'integer', 'flights' => 'integer',
'flight_time' => 'integer', 'flight_time' => 'integer',
'balance' => 'double', 'transferred_time' => 'integer',
'state' => 'integer', 'balance' => 'double',
'status' => 'integer', 'state' => 'integer',
'status' => 'integer',
]; ];
public static $rules = [ public static $rules = [