1234567891011121314151617181920212223242526 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- // use Illuminate\Database\Eloquent\SoftDeletes;
- class GoodsAgentTotal extends Model
- {
- // use SoftDeletes;
- //定义表
- protected $table = "goods_sku_agent_total";
- //定义主键
- protected $primaryKey = "id";
- protected $fillable = ['user_id','goods_id','sku_id','total'];
- public $timestamps = false;
- public function goods()
- {
- return $this->hasOne('App\Models\Goods');
- }
- public function user()
- {
- return $this->hasOne('App\Models\User');
- }
- }
|