Customer.php 579 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\HasMany;
  5. class Customer extends Model
  6. {
  7. protected $fillable = [
  8. "code", //客户代码
  9. "name", //客户名称
  10. "company_name", //公司名称
  11. "invoice_address", //公司名称
  12. "contact_man", //公司名称
  13. "phone", //公司名称
  14. "comment", //公司名称
  15. ];
  16. public function customerLogs(): HasMany
  17. {
  18. return $this->hasMany(CustomerLog::class,'customer_id','id');
  19. }
  20. }