RewardPointCustomerSign.php 613 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Longyi\RewardPoints\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class RewardPointCustomerSign extends Model
  5. {
  6. protected $table = 'mw_reward_point_customer_sign';
  7. protected $primaryKey = 'id';
  8. protected $fillable = [
  9. 'customer_id',
  10. 'sign_date',
  11. 'count_date',
  12. 'point',
  13. 'code'
  14. ];
  15. protected $casts = [
  16. 'count_date' => 'integer',
  17. 'point' => 'integer'
  18. ];
  19. protected $dates = ['created', 'updated'];
  20. public function customer()
  21. {
  22. return $this->belongsTo(Customer::class, 'customer_id');
  23. }
  24. }