AgentProfitEntry.php 1.0 KB

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models\Agent;
  3. use App\Models\BaseModel;
  4. /** 合营实时分成账本:每条已结算注单(share_bet_facts)一行,改派彩/作废时追加 revision。 */
  5. class AgentProfitEntry extends BaseModel
  6. {
  7. public const STATUS_COUNTED = 'counted';
  8. public const STATUS_SKIPPED_INACTIVE = 'skipped_inactive';
  9. public const STATUS_SKIPPED_NO_PLAN = 'skipped_no_plan';
  10. public const STATUS_SKIPPED_CATEGORY = 'skipped_category';
  11. protected $table = 'agent_profit_entries';
  12. protected $guarded = ['id'];
  13. protected $hidden = ['realtime_balance_after'];
  14. protected $casts = [
  15. 'agent_id' => 'integer', 'fact_id' => 'integer', 'revision' => 'integer', 'user_id' => 'integer',
  16. 'settled_at' => 'datetime:Y-m-d H:i:s', 'settle_date' => 'date:Y-m-d',
  17. 'bet_amount' => 'decimal:4', 'effective_amount' => 'decimal:4', 'net_profit' => 'decimal:4',
  18. 'rate' => 'decimal:4', 'share_amount' => 'decimal:4', 'realtime_balance_after' => 'decimal:4',
  19. 'rebate_record_id' => 'integer',
  20. ];
  21. }