1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace App\Models;
- use App\Models\BaseModel;
- /**
- * @description 经销商管理
- * @author system;
- * @version 1.0
- * @date 2018-05-14 13:26:07
- *
- */
- use Illuminate\Database\Eloquent\SoftDeletes;
- class AlbumAgentModel extends BaseModel
- {
- use SoftDeletes;
- protected $dates = ['delete_at'];
- /**
- * 数据表名
- *
- * @var string
- *
- */
- protected $table = 'album_agent';
- /*public function product()
- {
- return $this->belongsTo('App\Models\AlbumProductPriceModel','id','agent_id');
- }*/
- /**
- 主键
- */
- protected $primaryKey = 'id';
- //分页
- protected $perPage = PAGE_NUMS;
- /**
- * 可以被集体附值的表的字段
- *
- * @var string
- */
- protected $fillable = [
- 'store_id',
- 'is_show_ma_price',
- 'interactive',
- 'user_id',
- 'set_price_point',
- 'phone',
- 'address',
- 'lat',
- 'lon',
- 'name',
- 'status',
- 'realname',
- 'get_count',
- 'callCount',
- 'newCount',
- 'pointCount',
- 'favoriteCount',
- 'share_times'
- ];
- public function user()
- {
- return $this->belongsTo('App\Models\AlbumUserModel', 'user_id');
- }
- }
|