| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- /**
- * App\Models\TableNumber
- *
- * @property int $id
- * @property int $shop_id 店铺ID
- * @property int $number 桌号
- * @property string $table_code 桌号码
- * @property int|null $status 状态
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property string|null $title 标题
- * @property int|null $is_del
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber query()
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereIsDel($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereNumber($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereShopId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereStatus($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereTableCode($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereTitle($value)
- * @method static \Illuminate\Database\Eloquent\Builder|TableNumber whereUpdatedAt($value)
- * @mixin \Eloquent
- */
- class TableNumber extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'table_number';
- /**
- * 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');
- }
- }
|