| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 会员日志
- *
- * @property int $id
- * @property int $m_id 会员ID
- * @property string $msg 操作说明
- * @property string $url 请求地址
- * @property string $ip 访问IP
- * @property string|null $data 请求内容
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog query()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereData($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereIp($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereMId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereMsg($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberLog whereUrl($value)
- * @mixin \Eloquent
- */
- class MemberLog extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'member_logs';
- /**
- * The primary key associated with the table.
- *
- * @var string
- */
- protected $primaryKey = 'id';
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public $timestamps = true;
- /**
- * 不能被批量赋值的属性
- *
- * @var array
- */
- protected $guarded = ['id', 'updated_at', 'created_at'];
- /**
- * 为数组 / JSON 序列化准备日期。
- *
- * @param DateTimeInterface $date
- * @return string
- */
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
- }
- }
|