add more fillable fields on models
This commit is contained in:
parent
ab264604e0
commit
b9a40af92d
|
|
@ -29,7 +29,9 @@ class Player extends Model
|
||||||
public const UPDATED_AT = 'last_modified';
|
public const UPDATED_AT = 'last_modified';
|
||||||
|
|
||||||
public $primaryKey = 'pid';
|
public $primaryKey = 'pid';
|
||||||
protected $fillable = ['uid', 'name', 'last_modified'];
|
protected $fillable = [
|
||||||
|
'uid', 'name', 'tid_skin', 'tid_cape', 'last_modified',
|
||||||
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'pid' => 'integer',
|
'pid' => 'integer',
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ class Report extends Model
|
||||||
public const RESOLVED = 1;
|
public const RESOLVED = 1;
|
||||||
public const REJECTED = 2;
|
public const REJECTED = 2;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'uploader', 'reporter', 'reason', 'status',
|
||||||
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'tid' => 'integer',
|
'tid' => 'integer',
|
||||||
'uploader' => 'integer',
|
'uploader' => 'integer',
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ class Texture extends Model
|
||||||
public const CREATED_AT = 'upload_at';
|
public const CREATED_AT = 'upload_at';
|
||||||
public const UPDATED_AT = null;
|
public const UPDATED_AT = null;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name', 'type', 'uploader', 'public', 'likes',
|
||||||
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'tid' => 'integer',
|
'tid' => 'integer',
|
||||||
'size' => 'integer',
|
'size' => 'integer',
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,10 @@ class User extends Authenticatable implements JWTSubject
|
||||||
|
|
||||||
protected $primaryKey = 'uid';
|
protected $primaryKey = 'uid';
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
protected $fillable = ['email', 'nickname', 'permission'];
|
|
||||||
|
protected $fillable = [
|
||||||
|
'email', 'nickname', 'avatar', 'score', 'permission', 'last_sign_at',
|
||||||
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'uid' => 'integer',
|
'uid' => 'integer',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user