add order item manage
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* @property int $id 主键
|
||||
* @property int $company_id 公司 ID 与 Tools 保持一致
|
||||
@@ -27,6 +29,32 @@ namespace App\Model;
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @mixin \App_Model_OrderItem
|
||||
*/
|
||||
#[OA\Schema(
|
||||
schema: 'OrderItem',
|
||||
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_id', type: 'integer', example: 1000),
|
||||
new OA\Property(property: 'platform_order_id', type: 'string', example: 'ORD-20260101-001'),
|
||||
new OA\Property(property: 'sub_order_id', type: 'string', nullable: true, example: 'SUB-001'),
|
||||
new OA\Property(property: 'sub_order_type_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'product_id', type: 'integer', example: 500),
|
||||
new OA\Property(property: 'platform_product_id', type: 'string', example: 'PROD-001'),
|
||||
new OA\Property(property: 'product_sku', type: 'string', nullable: true, example: 'SKU-ABC-001'),
|
||||
new OA\Property(property: 'product_barcode', type: 'string', nullable: true, example: '6901234567890'),
|
||||
new OA\Property(property: 'unit_price', type: 'number', format: 'decimal', example: 49.99),
|
||||
new OA\Property(property: 'quantity', type: 'integer', example: 2),
|
||||
new OA\Property(property: 'discount', type: 'number', format: 'decimal', example: 5.00),
|
||||
new OA\Property(property: 'total', type: 'number', format: 'decimal', example: 94.98),
|
||||
new OA\Property(property: 'created_date', type: 'string', format: 'date-time'),
|
||||
new OA\Property(property: 'ext', type: 'object', nullable: true, description: '扩展字段'),
|
||||
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
|
||||
new OA\Property(property: 'updated_at', type: 'string', format: 'date-time'),
|
||||
]
|
||||
)]
|
||||
class OrderItem extends Model
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user