<?php

namespace App\Swagger\v1;

/**
 * 스키마 컨테이너(어노테이션 스캔 용)
 */
class ProductExtraSchemas
{
    /**
     * 제품 카테고리 스키마
     *
     * @OA\Schema(
     *   schema="ProductCategory",
     *   type="object",
     *   required={"id","code_group","code","name","is_active","sort_order"},
     *
     *   @OA\Property(property="id", type="integer", example=4),
     *   @OA\Property(property="code_group", type="string", example="category"),
     *   @OA\Property(property="code", type="string", example="BP"),
     *   @OA\Property(property="name", type="string", example="절곡판"),
     *   @OA\Property(property="parent_id", type="integer", nullable=true, example=null),
     *   @OA\Property(
     *     property="attributes", type="object", nullable=true,
     *     example={"color":"blue","flags":{"screen":true}}
     *   ),
     *   @OA\Property(property="description", type="string", nullable=true, example="절곡판"),
     *   @OA\Property(property="is_active", type="integer", example=1),
     *   @OA\Property(property="sort_order", type="integer", example=10),
     *   @OA\Property(property="created_at", type="string", format="date-time", example="2025-07-23T09:00:00+09:00"),
     *   @OA\Property(property="updated_at", type="string", format="date-time", example="2025-07-23T09:00:00+09:00")
     * )
     */
    public function _category() {}

    /**
     * 제품 관련 스키마들
     *
     * @OA\Schema(
     *   schema="Product",
     *   type="object",
     *   required={"id","tenant_id","code","name","category_id","product_type","is_active"},
     *
     *   @OA\Property(property="id", type="integer", example=101),
     *   @OA\Property(property="tenant_id", type="integer", example=1),
     *   @OA\Property(property="code", type="string", example="PRD-001"),
     *   @OA\Property(property="name", type="string", example="스크린 모듈 KS001"),
     *   @OA\Property(property="category_id", type="integer", example=7),
     *   @OA\Property(property="product_type", type="string", example="PRODUCT"),
     *   @OA\Property(property="attributes", type="object", nullable=true, example={"color":"black","size":"L"}),
     *   @OA\Property(property="description", type="string", nullable=true, example="고객사 스펙"),
     *   @OA\Property(property="is_sellable", type="integer", example=1),
     *   @OA\Property(property="is_purchasable", type="integer", example=0),
     *   @OA\Property(property="is_producible", type="integer", example=1),
     *   @OA\Property(property="is_active", type="integer", example=1),
     *   @OA\Property(property="created_at", type="string", format="date-time", example="2025-08-25 10:00:00"),
     *   @OA\Property(property="updated_at", type="string", format="date-time", example="2025-08-25 11:00:00")
     * )
     *
     * @OA\Schema(
     *   schema="ProductPagination",
     *   type="object",
     *   description="라라벨 LengthAwarePaginator 구조",
     *
     *   @OA\Property(property="current_page", type="integer", example=1),
     *   @OA\Property(
     *     property="data",
     *     type="array",
     *
     *     @OA\Items(ref="#/components/schemas/Product")
     *   ),
     *
     *   @OA\Property(property="per_page", type="integer", example=20),
     *   @OA\Property(property="total", type="integer", example=123)
     * )
     *
     * @OA\Schema(
     *   schema="ProductCreateRequest",
     *   type="object",
     *   required={"code","name","category_id","product_type"},
     *
     *   @OA\Property(property="code", type="string", example="PRD-001"),
     *   @OA\Property(property="name", type="string", example="스크린 모듈 KS001"),
     *   @OA\Property(property="category_id", type="integer", example=7),
     *   @OA\Property(property="product_type", type="string", example="PRODUCT"),
     *   @OA\Property(property="attributes", type="object", nullable=true, example={"color":"black"}),
     *   @OA\Property(property="description", type="string", nullable=true, example=null),
     *   @OA\Property(property="is_sellable", type="integer", example=1),
     *   @OA\Property(property="is_purchasable", type="integer", example=0),
     *   @OA\Property(property="is_producible", type="integer", example=1),
     *   @OA\Property(property="is_active", type="integer", example=1)
     * )
     *
     * @OA\Schema(
     *   schema="ProductUpdateRequest",
     *   type="object",
     *
     *   @OA\Property(property="code", type="string", example="PRD-001"),
     *   @OA\Property(property="name", type="string", example="스크린 모듈 KS001"),
     *   @OA\Property(property="category_id", type="integer", example=7),
     *   @OA\Property(property="product_type", type="string", example="PART"),
     *   @OA\Property(property="attributes", type="object", nullable=true, example={"size":"XL"}),
     *   @OA\Property(property="description", type="string", nullable=true, example="사양 변경"),
     *   @OA\Property(property="is_sellable", type="integer", example=1),
     *   @OA\Property(property="is_purchasable", type="integer", example=0),
     *   @OA\Property(property="is_producible", type="integer", example=1),
     *   @OA\Property(property="is_active", type="integer", example=1)
     * )
     */
    public function _product() {}

    /**
     * BOM 스키마들
     *
     * @OA\Schema(
     *   schema="BomItem",
     *   type="object",
     *   required={"id","ref_type","ref_id","quantity","sort_order"},
     *
     *   @OA\Property(property="id", type="integer", example=11),
     *   @OA\Property(property="ref_type", type="string", enum={"PRODUCT","MATERIAL"}, example="PRODUCT"),
     *   @OA\Property(property="ref_id", type="integer", example=3),
     *   @OA\Property(property="code", type="string", nullable=true, example="PRD-003"),
     *   @OA\Property(property="name", type="string", nullable=true, example="모듈A"),
     *   @OA\Property(property="unit", type="string", nullable=true, example="EA"),
     *   @OA\Property(property="quantity", type="number", format="float", example=2.0000),
     *   @OA\Property(property="sort_order", type="integer", example=1),
     *   @OA\Property(property="is_default", type="integer", example=1)
     * )
     *
     * @OA\Schema(
     *   schema="BomItemBulkUpsertRequest",
     *   type="object",
     *   required={"items"},
     *
     *   @OA\Property(
     *     property="items",
     *     type="array",
     *
     *     @OA\Items(
     *       type="object",
     *
     *       @OA\Property(property="id", type="integer", nullable=true, example=null),
     *       @OA\Property(property="ref_type", type="string", enum={"PRODUCT","MATERIAL"}, example="MATERIAL"),
     *       @OA\Property(property="ref_id", type="integer", example=5),
     *       @OA\Property(property="quantity", type="number", format="float", example=4.0000),
     *       @OA\Property(property="sort_order", type="integer", example=2),
     *       @OA\Property(property="is_default", type="integer", example=0)
     *     )
     *   )
     * )
     *
     * @OA\Schema(
     *   schema="BomItemUpdateRequest",
     *   type="object",
     *
     *   @OA\Property(property="ref_type", type="string", enum={"PRODUCT","MATERIAL"}, example="PRODUCT"),
     *   @OA\Property(property="ref_id", type="integer", example=9),
     *   @OA\Property(property="quantity", type="number", format="float", example=1.5000),
     *   @OA\Property(property="sort_order", type="integer", example=3),
     *   @OA\Property(property="is_default", type="integer", example=1)
     * )
     *
     * @OA\Schema(
     *   schema="BomReorderRequest",
     *   type="array",
     *
     *   @OA\Items(
     *     type="object",
     *     required={"id","sort_order"},
     *
     *     @OA\Property(property="id", type="integer", example=11),
     *     @OA\Property(property="sort_order", type="integer", example=1)
     *   )
     * )
     */
    public function _bom() {}
}
