| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 用户表
- *
- * @property int $id
- * @property string|null $phone 手机号码
- * @property string|null $nickname 昵称
- * @property string|null $head_img 头像
- * @property int|null $sex 性别
- * @property string|null $password 登录密码
- * @property string|null $encrypt 加密字符串
- * @property string|null $token_str token
- * @property string|null $money 余额
- * @property int|null $is_del 是否删除 0否 1是
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @method static \Illuminate\Database\Eloquent\Builder|Member newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|Member newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|Member query()
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereEncrypt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereHeadImg($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereIsDel($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereMoney($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereNickname($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member wherePassword($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member wherePhone($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereSex($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereTokenStr($value)
- * @method static \Illuminate\Database\Eloquent\Builder|Member whereUpdatedAt($value)
- * @mixin \Eloquent
- */
- class Member extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'member';
- /**
- * 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');
- }
- }
|