MainShopSet.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. namespace App\Models\Main;
  3. use DateTimeInterface;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * App\Models\Main\MainShopSet
  7. *
  8. * @property int $id
  9. * @property int $shop_id 店铺ID
  10. * @property float $discount 折扣比列
  11. * @property float $province_num 省级返佣比列
  12. * @property float $city_num 市级返佣比列
  13. * @property float $area_num 区级返佣比列
  14. * @property float $sales_num 分销商返佣比列
  15. * @property float $shop_num 店铺返佣比列
  16. * @property float $member_num 会员公益豆获取比列
  17. * @property float $purchases_num 进货金获取比列
  18. * @property \Illuminate\Support\Carbon|null $created_at
  19. * @property \Illuminate\Support\Carbon|null $updated_at
  20. * @property int|null $fans_num 粉丝最大数量
  21. * @property float|null $member_cash 会员返现比列
  22. * @property float $service_num 交易手续费
  23. * @property string|null $performance 业绩
  24. * @property int|null $is_bean 是否启用分销提成转化振合豆 0否1是
  25. * @property int|null $is_cancel 是否超时取消
  26. * @property int|null $cancel_time 取消的时间
  27. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet newModelQuery()
  28. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet newQuery()
  29. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet query()
  30. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereAreaNum($value)
  31. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereCancelTime($value)
  32. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereCityNum($value)
  33. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereCreatedAt($value)
  34. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereDiscount($value)
  35. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereFansNum($value)
  36. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereId($value)
  37. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereIsBean($value)
  38. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereIsCancel($value)
  39. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereMemberCash($value)
  40. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereMemberNum($value)
  41. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet wherePerformance($value)
  42. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereProvinceNum($value)
  43. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet wherePurchasesNum($value)
  44. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereSalesNum($value)
  45. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereServiceNum($value)
  46. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereShopId($value)
  47. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereShopNum($value)
  48. * @method static \Illuminate\Database\Eloquent\Builder|MainShopSet whereUpdatedAt($value)
  49. * @mixin \Eloquent
  50. */
  51. class MainShopSet extends Model
  52. {
  53. protected $connection = 'mysqlTwo';
  54. /**
  55. * The table associated with the model.
  56. *
  57. * @var string
  58. */
  59. protected $table = 'shop_sets';
  60. /**
  61. * The primary key associated with the table.
  62. *
  63. * @var string
  64. */
  65. protected $primaryKey = 'id';
  66. /**
  67. * Indicates if the model should be timestamped.
  68. *
  69. * @var bool
  70. */
  71. public $timestamps = true;
  72. /**
  73. * 不能被批量赋值的属性
  74. *
  75. * @var array
  76. */
  77. protected $guarded = [ 'id', 'updated_at', 'created_at'];
  78. /**
  79. * 为数组 / JSON 序列化准备日期。
  80. *
  81. * @param DateTimeInterface $date
  82. * @return string
  83. */
  84. protected function serializeDate(DateTimeInterface $date)
  85. {
  86. return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
  87. }
  88. }