LhcOrder.php 998 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Models;
  3. use App\Models\LhcLottery;
  4. class LhcOrder extends BaseModel
  5. {
  6. protected $table = 'lhc_order';
  7. protected $fillable = ['issue','ordernum','member_id','game','gameplay','number','odds','amount','lottery_status','win_amount','profit_and_loss','is_faker','remark','type'];
  8. protected $hidden = [];
  9. public $timestamps = true;
  10. protected $dateFormat = 'U'; // U 代表 UNIX 时间戳(int)
  11. public function lottery()
  12. {
  13. return $this->belongsTo(LhcLottery::class, 'issue', 'issue')
  14. ->select('issue', 'type', 'open_code', 'open_time', 'is_settlement');
  15. }
  16. public static function getRemark($type)
  17. {
  18. if ($type == 1) {
  19. return '新澳门六合彩';
  20. } elseif ($type == 2) {
  21. return '香港六合彩';
  22. } elseif ($type == 3) {
  23. return '澳门六合彩';
  24. } elseif ($type == 4) {
  25. return '极速六合彩';
  26. }
  27. return '';
  28. }
  29. }