CustomerSpec.php 301 B

123456789101112131415161718
  1. <?php
  2. declare(strict_types=1);
  3. namespace app\common\model;
  4. use think\Model;
  5. class CustomerSpec Extends Model
  6. {
  7. const NORMAL = 1;
  8. const DELETE = 0;
  9. //customer
  10. public function customer()
  11. {
  12. return $this->hasOne(Customer::class,'id','customer_id');
  13. }
  14. }