GoodsAgentTotal.php 579 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. // use Illuminate\Database\Eloquent\SoftDeletes;
  5. class GoodsAgentTotal extends Model
  6. {
  7. // use SoftDeletes;
  8. //定义表
  9. protected $table = "goods_sku_agent_total";
  10. //定义主键
  11. protected $primaryKey = "id";
  12. protected $fillable = ['user_id','goods_id','sku_id','total'];
  13. public $timestamps = false;
  14. public function goods()
  15. {
  16. return $this->hasOne('App\Models\Goods');
  17. }
  18. public function user()
  19. {
  20. return $this->hasOne('App\Models\User');
  21. }
  22. }