<?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',
        'user_id',
        'set_price_point',
        'phone',
        'address',
        'lat',
        'lon',
        'name',
        'status',
        'realname',
        'get_count',
        'share_times'
    ];
    public function user()
    {
        return $this->belongsTo('App\Models\AlbumUserModel', 'user_id');
    }
}