Add opt-in as part of GDPR #244

This commit is contained in:
Nabeel Shahzad 2018-05-24 22:17:41 -05:00
parent 019cf9b4fb
commit a515921143
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class CreateUsersTable extends Migration
$table->string('timezone', 64)->nullable();
$table->unsignedTinyInteger('status')->nullable()->default(0);
$table->unsignedTinyInteger('state')->nullable()->default(0);
$table->boolean('opt_in')->nullable();
$table->boolean('active')->nullable();
$table->ipAddress('last_ip')->nullable();
$table->rememberToken();

View File

@ -26,6 +26,7 @@ use Laratrust\Traits\LaratrustUserTrait;
* @property Journal journal
* @property string pilot_id
* @property int state
* @property bool opt_in
* @mixin \Illuminate\Notifications\Notifiable
* @mixin \Laratrust\Traits\LaratrustUserTrait
*/
@ -60,6 +61,7 @@ class User extends Authenticatable
'timezone',
'state',
'status',
'opt_in',
'created_at',
'updated_at',
];
@ -80,6 +82,7 @@ class User extends Authenticatable
'balance' => 'double',
'state' => 'integer',
'status' => 'integer',
'opt_in' => 'boolean',
];
public static $rules = [
@ -122,7 +125,7 @@ class User extends Authenticatable
{
$this->attributes['timezone'] = $value;
}
/**
* Return a File model
*/