add product manager

This commit is contained in:
2026-03-13 09:33:15 +08:00
parent 48a2a025f1
commit cef2525f83
6 changed files with 1224 additions and 0 deletions
+27
View File
@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace App\Model;
use OpenApi\Attributes as OA;
/**
* @property int $id 主键
* @property int $company_id 公司 ID
@@ -34,6 +36,31 @@ namespace App\Model;
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*/
#[OA\Schema(
schema: 'Product',
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: 'status_id', type: 'integer', example: 1),
new OA\Property(property: 'type_id', type: 'integer', example: 1),
new OA\Property(property: 'platform_item_id', type: 'string', example: 'ITEM-001'),
new OA\Property(property: 'platform_model_id', type: 'string', nullable: true, example: 'MODEL-A'),
new OA\Property(property: 'name', type: 'string', nullable: true, example: 'iPhone 16 Pro'),
new OA\Property(property: 'price', type: 'number', format: 'decimal', example: 99.99),
new OA\Property(property: 'currency', type: 'string', example: 'CNY'),
new OA\Property(property: 'num', type: 'integer', example: 100),
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', nullable: true),
new OA\Property(property: 'updated_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 Product extends Model
{
/**