OrderAction.php 637 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. /**
  5. * 模型
  6. */
  7. class OrderAction extends Model
  8. {
  9. // 表名
  10. protected $name = 'shop_order_action';
  11. // 开启自动写入时间戳字段
  12. protected $autoWriteTimestamp = 'int';
  13. // 定义时间戳字段名
  14. protected $createTime = 'createtime';
  15. protected $updateTime = '';
  16. // 追加属性
  17. protected $append = [];
  18. public static function push($order_sn, $operator, $memo)
  19. {
  20. self::create([
  21. 'order_sn' => $order_sn,
  22. 'operator' => $operator,
  23. 'memo' => $memo
  24. ]);
  25. return true;
  26. }
  27. }