DeliveryAppointmentDetail.php 590 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class DeliveryAppointmentDetail extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable=[
  9. "delivery_appointment_id",
  10. "commodity_id",
  11. "bar_code",
  12. "name",
  13. "amount",
  14. ];
  15. public $timestamps=false;
  16. public function deliveryAppointment()
  17. { //预约信息
  18. return $this->belongsTo(DeliveryAppointment::class);
  19. }
  20. public function commodity()
  21. { //商品
  22. return $this->belongsTo(Commodity::class);
  23. }
  24. }