AlbumAgentModel.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace App\Models;
  3. use App\Models\BaseModel;
  4. /**
  5. * @description 经销商管理
  6. * @author system;
  7. * @version 1.0
  8. * @date 2018-05-14 13:26:07
  9. *
  10. */
  11. use Illuminate\Database\Eloquent\SoftDeletes;
  12. class AlbumAgentModel extends BaseModel
  13. {
  14. use SoftDeletes;
  15. protected $dates = ['delete_at'];
  16. /**
  17. * 数据表名
  18. *
  19. * @var string
  20. *
  21. */
  22. protected $table = 'album_agent';
  23. /*public function product()
  24. {
  25. return $this->belongsTo('App\Models\AlbumProductPriceModel','id','agent_id');
  26. }*/
  27. /**
  28. 主键
  29. */
  30. protected $primaryKey = 'id';
  31. //分页
  32. protected $perPage = PAGE_NUMS;
  33. /**
  34. * 可以被集体附值的表的字段
  35. *
  36. * @var string
  37. */
  38. protected $fillable = [
  39. 'store_id',
  40. 'is_show_ma_price',
  41. 'interactive',
  42. 'user_id',
  43. 'set_price_point',
  44. 'phone',
  45. 'address',
  46. 'lat',
  47. 'lon',
  48. 'name',
  49. 'status',
  50. 'realname',
  51. 'get_count',
  52. 'callCount',
  53. 'newCount',
  54. 'pointCount',
  55. 'favoriteCount',
  56. 'share_times'
  57. ];
  58. public function user()
  59. {
  60. return $this->belongsTo('App\Models\AlbumUserModel', 'user_id');
  61. }
  62. }