|
|
@@ -0,0 +1,143 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Models\Main;
|
|
|
+
|
|
|
+use DateTimeInterface;
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * App\Models\Main\MainShop
|
|
|
+ *
|
|
|
+ * @property int $id
|
|
|
+ * @property string $shop_name 店铺名称
|
|
|
+ * @property string $shop_sn 店铺编号
|
|
|
+ * @property string $shop_phone 店铺电话
|
|
|
+ * @property string $shopkeeper 店主姓名
|
|
|
+ * @property string $shop_logo 店铺logo
|
|
|
+ * @property int $class_id 一级分类ID
|
|
|
+ * @property int $class_two_id 二级分类ID
|
|
|
+ * @property int $province_id 省份ID
|
|
|
+ * @property int $city_id 市ID
|
|
|
+ * @property int $area_id 区ID
|
|
|
+ * @property int $street_id 街道ID
|
|
|
+ * @property string $city_name 城市名称
|
|
|
+ * @property string $address 详细地址
|
|
|
+ * @property int $status 状态,0:待审核,1:已通过,2:已关闭
|
|
|
+ * @property int $type 类型:1:省代,2:市代,3:区代,4:分销商,5:店铺,6:自营店铺,7:厂家
|
|
|
+ * @property int $is_del 是否删除
|
|
|
+ * @property string $lon 经度
|
|
|
+ * @property string $lat 纬度
|
|
|
+ * @property \Illuminate\Support\Carbon|null $created_at
|
|
|
+ * @property \Illuminate\Support\Carbon|null $updated_at
|
|
|
+ * @property int $sort 排序
|
|
|
+ * @property string $class_name 分类名称
|
|
|
+ * @property float|null $shop_score 评分
|
|
|
+ * @property int|null $collect_num 收藏人数
|
|
|
+ * @property string|null $shop_code 推荐码
|
|
|
+ * @property string|null $shop_share_img 店铺推荐图
|
|
|
+ * @property int|null $m_id 绑定账户ID
|
|
|
+ * @property int|null $sex 性别
|
|
|
+ * @property int|null $recom_shop_id 推广店铺ID
|
|
|
+ * @property float|null $shop_money 店铺余额
|
|
|
+ * @property float|null $purchase_money 店铺进货金
|
|
|
+ * @property string $license_sn 营业执照编号
|
|
|
+ * @property string|null $pay_img 收款码
|
|
|
+ * @property int|null $goods_audit 商品是否审核1需要审核 0不用审核
|
|
|
+ * @property int|null $discount 店铺折扣
|
|
|
+ * @property string|null $accredit_ids 授权地址ids
|
|
|
+ * @property string|null $code_img 店铺code图片地址
|
|
|
+ * @property int|null $pay_voice 是否开启线下支付语音提醒 0否 1是
|
|
|
+ * @property int|null $order_notice 是否开启新订单通知 0否 1是
|
|
|
+ * @property string|null $bank_money 银联到账金额
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop newModelQuery()
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop newQuery()
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop query()
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereAccreditIds($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereAddress($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereAreaId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereBankMoney($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereCityId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereCityName($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereClassId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereClassName($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereClassTwoId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereCodeImg($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereCollectNum($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereCreatedAt($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereDiscount($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereGoodsAudit($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereIsDel($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereLat($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereLicenseSn($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereLon($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereMId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereOrderNotice($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop wherePayImg($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop wherePayVoice($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereProvinceId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop wherePurchaseMoney($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereRecomShopId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereSex($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopCode($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopLogo($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopMoney($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopName($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopPhone($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopScore($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopShareImg($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopSn($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereShopkeeper($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereSort($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereStatus($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereStreetId($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereType($value)
|
|
|
+ * @method static \Illuminate\Database\Eloquent\Builder|MainShop whereUpdatedAt($value)
|
|
|
+ * @mixin \Eloquent
|
|
|
+ */
|
|
|
+class MainShop extends Model
|
|
|
+{
|
|
|
+ protected $connection = 'mysqlTwo';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The table associated with the model.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $table = 'shops';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 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');
|
|
|
+ }
|
|
|
+
|
|
|
+}
|