BranchGoodProperty


Representa a una variante (Property) de un producto (Good) vinculado a la sucursal (Branch) en cuestión. Cuando un Good tiene Properties, contiene registros en la entidad GoodProperty. Luego, cuando ese Good es asociado a un Branch registrándose como BranchGood, los GoodProperties asociados son registrados como BranchGoodProperty. Esto permite modificar los datos por defecto que se traen desde GoodProperty y permite modificar el display_name, options y estado activo/inactivo para esa Branch en específico.

Modelo BranchGoodProperty

{
    "id": 97,
    "display_name": "Blablabla",
    "options": 256,
    "disabled": false,
    "created_at": "2020-05-04 17:47:21",
    "updated_at": "2020-05-04 17:47:21",
    "branch_id": 22,
    "property_id": 46,
    "good_id": 109,
    "in_order": 65535,
    "prop_type": 256,
    "is_type_options": true,
    "is_type_range": false,
    "is_type_text": false,
    "is_dynamic": false,
    "is_free": false,
    "is_consumable": false,
    "is_multi_selection": false,
    "min_count": 0,
    "max_count": 0,
    "stack_count": 0,
    "is_admin_customizable": false,
    "options_data": {
        "use_value": 256,
        "use_name": "options",
        "type_value": 256,
        "type_name": null,
        "is_multi_options": false,
        "min_count": 0,
        "max_count": 1,
        "stack_count": 1,
        "is_dynamic": false,
        "is_free": false,
        "is_consumable": false,
        "is_admin_customizable": false
    },
    "property": {
        "id": 46,
        "name": "Blablabla",
        "type": 256,
        "disabled": false,
        "created_at": "2020-04-22 19:43:34",
        "updated_at": "2020-04-22 19:43:34",
        "property_group_id": null,
        "branch_group_id": 42,
        "is_type_options": true,
        "is_type_range": false,
        "is_type_text": false,
        "property_options": [
            {
                "id": 580,
                "name": "Aaaa",
                "price_e2": 223234500,
                "in_order": 65535,
                "created_at": "2020-04-22 19:43:34",
                "updated_at": "2020-04-22 19:43:34",
                "property_id": 46,
                "is_default": false
            }
        ],
        "property_range": null,
        "property_text": null
    },
    "property_options": [
        {
            "id": 580,
            "name": "Aaaa",
            "price_e2": 223234500,
            "in_order": 65535,
            "created_at": "2020-04-22 19:43:34",
            "updated_at": "2020-04-22 19:43:34",
            "property_id": 46,
            "is_default": false,
            "display_price": "2,232,345.00$",
            "sold_out": false,
            "quantity": null
        }
    ],
    "property_range": null,
    "property_text": null
}
Atributo Tipo Descripción
id int -
display_name string -
options int -
disabled bool -
created_at datetime\|null -
updated_at datetime\|null -
branch_id int -
property_id int -
good_id int -
in_order int -
prop_type int BitMask ({@link self::options} & 0xfff)
is_type_options bool BitMask (({@link self::options} & 0x100) !== 0)
is_type_range bool BitMask (({@link self::options} & 0x200) !== 0)
is_type_text bool BitMask (({@link self::options} & 0x400) !== 0)
is_dynamic bool BitMask (({@link self::options} & 0x1000) !== 0)
is_free bool BitMask (({@link self::options} & 0x2000) !== 0)
is_consumable bool BitMask (({@link self::options} & 0x4000) !== 0)
is_multi_selection bool BitMask (({@link self::options} & 0x80) !== 0)
min_count int BitMask (({@link self::options} & 0xf00000) >> 20)
max_count int BitMask (({@link self::options} & 0xf0000) >> 16)
stack_count int BitMask (({@link self::options} & 0xf000000) >> 24)
is_admin_customizable bool BitMask (({@link self::options} & 0x10000000) !== 0)
options_data array -

Listar BranchGoodProperty

Listar BranchGoodProperty de BranchGood

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branch-goods/{branchGoodId}/branch-good-properties N/A

Actualizar BranchGoodProperty

Método URI Cabeceras
PATCH /companies/{companyId}/branch-good-properties/{branchGoodPropertyId} Authorization
{
    "display_name": "string|max:64",
    "disabled": "boolean",
    "options": "numeric",
    "in_order": "integer|min:1",
    "prop_type": "nullable|integer|min:0|max:4095",
    "is_type_options": "nullable|boolean",
    "is_type_range": "nullable|boolean",
    "is_type_text": "nullable|boolean",
    "is_dynamic": "nullable|boolean",
    "is_free": "nullable|boolean",
    "is_consumable": "nullable|boolean",
    "is_multi_selection": "nullable|boolean",
    "min_count": "nullable|integer|min:0|max:15",
    "max_count": "nullable|integer|min:0|max:15",
    "stack_count": "nullable|integer|min:0|max:15",
    "is_admin_customizable": "nullable|boolean"
}

Enlaces de BranchGoodProperty