MemberLog.php 901 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Longyi\Member\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Longyi\Member\Contracts\MemberLog as MemberLogContract;
  6. class MemberLog extends Model implements MemberLogContract
  7. {
  8. use HasFactory;
  9. protected $table = 'member_log';
  10. /**
  11. * The attributes that are mass assignable.
  12. *
  13. * @var array
  14. */
  15. protected $fillable = [
  16. 'customer_id',
  17. 'order_id',
  18. 'type',
  19. 'amount',
  20. 'previous_expire_date',
  21. 'expirationdate'
  22. ];
  23. /**
  24. * The attributes that should be cast.
  25. *
  26. * @var array
  27. */
  28. protected $casts = [
  29. 'customer_id' => 'integer',
  30. 'order_id' => 'integer',
  31. 'type' => 'integer',
  32. 'amount' => 'decimal:2',
  33. 'previous_expire_date' => 'date',
  34. 'expirationdate' => 'date',
  35. ];
  36. }