| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 商家打印机表
- *
- * @property int $id 商家绑定打印机
- * @property int|null $shop_id
- * @property int|null $brand_id 品牌id
- * @property string|null $note 打印机备注
- * @property string|null $sn 打印机sn
- * @property string|null $key 打印机key
- * @property int|null $template 模板类型 1为58mm 2为75mm
- * @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|ShopPrinter newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter query()
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereBrandId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereIsDel($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereKey($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereNote($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereShopId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereSn($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereTemplate($value)
- * @method static \Illuminate\Database\Eloquent\Builder|ShopPrinter whereUpdatedAt($value)
- * @mixin \Eloquent
- */
- class ShopPrinter extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'shops_printer';
- /**
- * 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');
- }
- }
|