| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace App\Models\Main;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- class MainMemberOpenId extends Model
- {
- protected $connection = 'mysqlTwo';
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'member_open_ids';
- /**
- * 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'];
- private $typeEnum=[
- 1=>'微信H5',
- 2=>'微信小程序',
- 3=>'支付宝',
- 4=>'点餐小程序',
- ];
- /**
- * 为数组 / JSON 序列化准备日期。
- *
- * @param DateTimeInterface $date
- * @return string
- */
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
- }
- }
|