AuctionBooking.php 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. *
  4. * @author: xaboy<365615158@qq.com>
  5. * @day: 2017/11/02
  6. */
  7. namespace app\models\auction;
  8. use crmeb\traits\ModelTrait;
  9. use crmeb\basic\BaseModel;
  10. /**
  11. * 预约 Model
  12. * Class WechatNews
  13. * @package app\admin\model\wechat
  14. */
  15. class AuctionBooking extends BaseModel
  16. {
  17. use ModelTrait;
  18. protected $pk = 'id';
  19. protected $name = 'auction_booking';
  20. protected $autoWriteTimestamp = true;
  21. /**
  22. * 添加预约记录
  23. * @param $uid
  24. * @param $auction
  25. * @return void
  26. */
  27. public static function booKing($uid, $auction)
  28. {
  29. self::create([
  30. 'uid' => $uid,
  31. 'anticipate' => $auction['anticipate'],
  32. 'auction_id' => $auction['id'],
  33. 'frequency' => $auction['frequency'],
  34. 'create_time' => time()
  35. ]);
  36. }
  37. }