| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Model;
- /**
- * 用户openid表
- *
- * @property int $id
- * @property int $m_id 会员ID
- * @property string $openid 公众号id
- * @property string|null $unionid 公众号唯一ID
- * @property int $type 平台类型:1:微信,2:小程序,3:支付宝
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property int|null $is_del
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId query()
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereIsDel($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereMId($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereOpenid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereType($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereUnionid($value)
- * @method static \Illuminate\Database\Eloquent\Builder|MemberOpenId whereUpdatedAt($value)
- * @mixin \Eloquent
- */
- class MemberOpenId extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'member_open_id';
- /**
- * 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=>'支付宝',
- ];
- /**
- * 为数组 / JSON 序列化准备日期。
- *
- * @param DateTimeInterface $date
- * @return string
- */
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
- }
- }
|