mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-03-16 16:30:01 +01:00
Convert deprecated $dates
property to $casts
This commit is contained in:
parent
3b2d58b77f
commit
40ead10cd8
5 changed files with 8 additions and 7 deletions
|
@ -59,7 +59,7 @@ class Activity extends Model
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
protected $dates = ['created_at'];
|
|
||||||
protected $fillable = ['created_at', 'user_id', 'activity_type', 'resource_type', 'resource_id'];
|
protected $fillable = ['created_at', 'user_id', 'activity_type', 'resource_type', 'resource_id'];
|
||||||
protected $appends = ['url', 'thumbnail_url', 'human_friendly_resource_type'];
|
protected $appends = ['url', 'thumbnail_url', 'human_friendly_resource_type'];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|
|
@ -52,7 +52,7 @@ use Illuminate\Support\Facades\Request;
|
||||||
class ResourceLogItem extends Model
|
class ResourceLogItem extends Model
|
||||||
{
|
{
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
protected $dates = ['created_at'];
|
|
||||||
|
|
||||||
const VIEW = 1;
|
const VIEW = 1;
|
||||||
const DOWNLOAD = 2;
|
const DOWNLOAD = 2;
|
||||||
|
|
|
@ -154,11 +154,10 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
|
|
||||||
protected $elasticsearchType = 'track';
|
protected $elasticsearchType = 'track';
|
||||||
|
|
||||||
protected $dates = [
|
|
||||||
'published_at', 'released_at',
|
|
||||||
];
|
|
||||||
protected $hidden = ['original_tags', 'metadata'];
|
protected $hidden = ['original_tags', 'metadata'];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
'published_at' => 'datetime',
|
||||||
|
'released_at' => 'datetime',
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
'user_id' => 'integer',
|
'user_id' => 'integer',
|
||||||
'license_id' => 'integer',
|
'license_id' => 'integer',
|
||||||
|
|
|
@ -67,8 +67,9 @@ class TrackFile extends Model
|
||||||
const STATUS_PROCESSING_PENDING = 3;
|
const STATUS_PROCESSING_PENDING = 3;
|
||||||
|
|
||||||
protected $appends = ['is_expired'];
|
protected $appends = ['is_expired'];
|
||||||
protected $dates = ['expires_at'];
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
'expires_at' => 'datetime',
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
'track_id' => 'integer',
|
'track_id' => 'integer',
|
||||||
'is_master' => 'boolean',
|
'is_master' => 'boolean',
|
||||||
|
|
|
@ -110,6 +110,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||||
|
|
||||||
protected $elasticsearchType = 'user';
|
protected $elasticsearchType = 'user';
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
'disabled_at' => 'datetime',
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
'sync_names' => 'boolean',
|
'sync_names' => 'boolean',
|
||||||
'uses_gravatar' => 'boolean',
|
'uses_gravatar' => 'boolean',
|
||||||
|
@ -120,7 +121,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||||
'is_archived' => 'boolean',
|
'is_archived' => 'boolean',
|
||||||
'redirect_to' => 'integer',
|
'redirect_to' => 'integer',
|
||||||
];
|
];
|
||||||
protected $dates = ['created_at', 'updated_at', 'disabled_at'];
|
|
||||||
protected $hidden = ['disabled_at', 'remember_token'];
|
protected $hidden = ['disabled_at', 'remember_token'];
|
||||||
|
|
||||||
public function scopeUserDetails($query)
|
public function scopeUserDetails($query)
|
||||||
|
|
Loading…
Add table
Reference in a new issue