add order manage
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Model;
|
||||
|
||||
use App\Model\OrderItem;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* @property int $id 主键
|
||||
@@ -35,12 +36,48 @@ use App\Model\OrderItem;
|
||||
* @property string $city 城市
|
||||
* @property string $province 省
|
||||
* @property string $country 国家
|
||||
* @property string $hash raw 字段的 MD5 哈希值
|
||||
* @property string $raw 远程原始数据
|
||||
* @property string $ext 扩展字段
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @mixin \App_Model_Order
|
||||
*/
|
||||
#[OA\Schema(
|
||||
schema: 'Order',
|
||||
type: 'object',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'company_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'platform_id', type: 'integer', example: 2),
|
||||
new OA\Property(property: 'store_id', type: 'integer', example: 100),
|
||||
new OA\Property(property: 'order_status_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'platform_order_id', type: 'string', example: 'ORD-20260101-001'),
|
||||
new OA\Property(property: 'buyer_user_id', type: 'string', nullable: true, example: 'buyer_123'),
|
||||
new OA\Property(property: 'payment_method_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'presale', type: 'boolean', example: false),
|
||||
new OA\Property(property: 'total_amount', type: 'number', format: 'decimal', example: 199.99),
|
||||
new OA\Property(property: 'total_paid', type: 'number', format: 'decimal', example: 189.99),
|
||||
new OA\Property(property: 'total_discount', type: 'number', format: 'decimal', example: 10.00),
|
||||
new OA\Property(property: 'total_received', type: 'number', format: 'decimal', example: 189.99),
|
||||
new OA\Property(property: 'freight_fee', type: 'number', format: 'decimal', example: 0.00),
|
||||
new OA\Property(property: 'tax_fee', type: 'number', format: 'decimal', example: 0.00),
|
||||
new OA\Property(property: 'discount_fee', type: 'number', format: 'decimal', example: 10.00),
|
||||
new OA\Property(property: 'commission_fee', type: 'number', format: 'decimal', example: 5.00),
|
||||
new OA\Property(property: 'coupon_amount', type: 'number', format: 'decimal', example: 0.00),
|
||||
new OA\Property(property: 'voucher_amount', type: 'number', format: 'decimal', example: 0.00),
|
||||
new OA\Property(property: 'order_type_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'hash', type: 'string', example: 'a1b2c3d4e5f6...'),
|
||||
new OA\Property(property: 'raw', type: 'object', nullable: true, description: '平台原始数据'),
|
||||
new OA\Property(property: 'ext', type: 'object', nullable: true, description: '扩展字段'),
|
||||
new OA\Property(property: 'created_date', type: 'string', format: 'date-time'),
|
||||
new OA\Property(property: 'updated_date', type: 'string', format: 'date-time', nullable: true),
|
||||
new OA\Property(property: 'paid_date', type: 'string', format: 'date-time', nullable: true),
|
||||
new OA\Property(property: 'shipping_date', type: 'string', format: 'date-time', nullable: true),
|
||||
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
|
||||
new OA\Property(property: 'updated_at', type: 'string', format: 'date-time'),
|
||||
]
|
||||
)]
|
||||
class Order extends Model
|
||||
{
|
||||
/**
|
||||
@@ -51,7 +88,7 @@ class Order extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['id', 'company_id', 'platform_id', 'store_id', 'order_status_id', 'platform_order_id', 'buyer_user_id', 'payment_method_id', 'presale', 'total_amount', 'total_paid', 'total_discount', 'total_received', 'freight_fee', 'tax_fee', 'discount_fee', 'commission_fee', 'coupon_amount', 'voucher_amount', 'order_type_id', 'created_date', 'updated_date', 'paid_date', 'shipping_date', 'zipcode', 'city', 'province', 'country', 'raw', 'ext', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['id', 'company_id', 'platform_id', 'store_id', 'order_status_id', 'platform_order_id', 'buyer_user_id', 'payment_method_id', 'presale', 'total_amount', 'total_paid', 'total_discount', 'total_received', 'freight_fee', 'tax_fee', 'discount_fee', 'commission_fee', 'coupon_amount', 'voucher_amount', 'order_type_id', 'created_date', 'updated_date', 'paid_date', 'shipping_date', 'zipcode', 'city', 'province', 'country', 'hash', 'raw', 'ext', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
|
||||
Reference in New Issue
Block a user