MemberLog.php 827 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. 'expirationdate'
  21. ];
  22. /**
  23. * The attributes that should be cast.
  24. *
  25. * @var array
  26. */
  27. protected $casts = [
  28. 'customer_id' => 'integer',
  29. 'order_id' => 'integer',
  30. 'type' => 'integer',
  31. 'amount' => 'decimal:2',
  32. 'expirationdate' => 'date',
  33. ];
  34. }