MpUserPointsDetail.php 740 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class MpUserPointsDetail extends Model
  5. {
  6. protected $table = 'mp_user_points_details';
  7. const TYPE_VIDEO = 'video';
  8. const TYPE_IMAGE = 'image';
  9. const TYPE_CHAT = 'chat';
  10. protected $fillable = [
  11. 'uid',
  12. 'cpid',
  13. 'task_id',
  14. 'type',
  15. 'api_type',
  16. 'charge_info',
  17. 'points_consumed',
  18. 'points_before',
  19. 'points_after',
  20. 'tokens_consumed',
  21. 'remark',
  22. ];
  23. protected $casts = [
  24. 'charge_info' => 'array',
  25. 'points_consumed' => 'float',
  26. 'points_before' => 'float',
  27. 'points_after' => 'float',
  28. 'tokens_consumed' => 'integer',
  29. ];
  30. }