12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019-04-28
- * Time: 15:30
- */
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class Shop extends Model
- {
- use SoftDeletes;
- protected $primaryKey = 'shop_id';
- public $table = 'shop';
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $fillable = ['shop_name','shop_short_name','mobile','address','province_id','province_name','city_id','city_name','contact_mobile','contact_name','shop_desc','status','logo_img','license_img','food_trans_license','other_license','proportion','verify_type','star'];
- /**
- * The attributes excluded from the model's JSON form.
- *
- * @var array
- */
- protected $hidden = [];
- //关联账户
- public function account()
- {
- return $this->hasOne('App\ShopAccount', 'shop_id', 'shop_id');
- }
- }
|