Goodtest.php 392 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Goodtest extends Model{
  5. protected $table='goods_all';
  6. // public function goods_spec(){
  7. // return $this->hasMany(GoodSpec::class,'goods_id');
  8. // }
  9. public function get_order(){
  10. return $this->belongsTo(OrderDetail::class,'goods_id','id');
  11. }
  12. public function getPrice(){
  13. }
  14. }