| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- namespace App\Models\Main;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- /**
- * App\Models\Main\MainMemberOpenId
- *
- * @property int $id
- * @property int $m_id 会员ID
- * @property string $openid 公众号id
- * @property string $unopenid 公众号唯一ID
- * @property int $type 平台类型:1:微信,2:小程序,3:支付宝
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId query()
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereMId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereOpenid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereType($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereUnopenid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MainMemberOpenId whereUpdatedAt($value)
- * @mixin \Eloquent
- */
- 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');
- }
- }
|