修复生产统计与维修记录用户数据
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace plugin\produce\app\model;
|
||||
|
||||
class MemberNotification extends BaseModel
|
||||
{
|
||||
protected $table = 'produce_member_notification';
|
||||
|
||||
protected $appends = ['created_date', 'read_date'];
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'member_id', 'user_code', 'type', 'title', 'content', 'repair_id', 'repair_no',
|
||||
'order_no', 'status', 'read_at', 'created_at', 'updated_at', 'deleted_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'member_id' => 'integer',
|
||||
'repair_id' => 'integer',
|
||||
'status' => 'integer',
|
||||
'read_at' => 'integer',
|
||||
'created_at' => 'integer',
|
||||
'updated_at' => 'integer',
|
||||
'deleted_at' => 'integer',
|
||||
];
|
||||
|
||||
public function getReadDateAttribute(): ?string
|
||||
{
|
||||
return $this->read_at ? date('Y-m-d H:i:s', (int) $this->read_at) : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user