update order model

This commit is contained in:
2026-01-30 17:01:29 +08:00
parent 95dca6bf79
commit b86b942b8d
2 changed files with 27 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Constants;
use Hyperf\Constants\Annotation\Constants;
use Hyperf\Constants\Annotation\Message;
use Hyperf\Constants\EnumConstantsTrait;
#[Constants]
enum OrderType: int
{
use EnumConstantsTrait;
// 普通订单
#[Message("Normal Order")]
case Normor_Order = 1;
// 有可能存在其他特殊订单的情况
// 比如:
// 1. 1 元锁定优惠订单
// 2. 不差价无实物订单
// 3. 服务类订单
// 4. 退运费订单(仅存在售后单,主订单不存在)
}
+1 -1
View File
@@ -56,7 +56,7 @@ class Order extends Model
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.
*/ */
protected array $casts = ['id' => 'integer', 'company_id' => 'integer', 'platform_id' => 'integer', 'store_id' => 'integer', 'order_status_id' => 'integer', 'payment_method_id' => 'integer', 'presale' => 'boolean', 'order_type_id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime']; protected array $casts = ['id' => 'integer', 'company_id' => 'integer', 'platform_id' => 'integer', 'store_id' => 'integer', 'order_status_id' => 'integer', 'payment_method_id' => 'integer', 'presale' => 'boolean', 'order_type_id' => 'integer', 'raw' => 'json', 'ext' => 'json', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
/** /**
* 获取订单子项(基于 hypertable 分区键查询) * 获取订单子项(基于 hypertable 分区键查询)