GoodSection
Modelo GoodSection
{
"id": 1,
"name": "Celebra Navidad",
"type": "custom",
"enabled": false,
"in_order": 1,
"is_featured": false,
"created_at": "2022-08-31 18:10:57",
"updated_at": "2025-08-11 15:40:26",
"company_id": 116,
"hour_from": "00:00",
"hour_to": "23:59",
"date_from": null,
"date_to": null,
"days": 0,
"day_sunday": false,
"day_monday": false,
"day_tuesday": false,
"day_wednesday": false,
"day_thursday": false,
"day_friday": false,
"day_saturday": false
}
| Atributo |
Tipo |
Descripción |
id |
int |
- |
name |
string |
- |
type |
string |
- |
enabled |
bool |
- |
in_order |
int |
- |
is_featured |
bool |
- |
created_at |
datetime\|null |
- |
updated_at |
datetime\|null |
- |
company_id |
int |
- |
hour_from |
string |
- |
hour_to |
string |
- |
days |
int |
- |
day_sunday |
bool |
BitMask (({@link self::days} & 0x1) !== 0) |
day_monday |
bool |
BitMask (({@link self::days} & 0x2) !== 0) |
day_tuesday |
bool |
BitMask (({@link self::days} & 0x4) !== 0) |
day_wednesday |
bool |
BitMask (({@link self::days} & 0x8) !== 0) |
day_thursday |
bool |
BitMask (({@link self::days} & 0x10) !== 0) |
day_friday |
bool |
BitMask (({@link self::days} & 0x20) !== 0) |
day_saturday |
bool |
BitMask (({@link self::days} & 0x40) !== 0) |
Insertar GoodSection
| Método |
URI |
Cabeceras |
| POST |
/companies/{companyId}/good-sections |
Authorization |
{
"name": "required|string|max:64",
"type": "string|in:custom",
"in_order": "integer|min:0",
"enabled": "boolean",
"is_featured": "boolean",
"good_ids": [
"integer|min:1"
],
"hour_from": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_to": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"date_from": "sometimes|nullable|date",
"date_to": "sometimes|nullable|date|after:date_from",
"tz": {
"string": true,
"regex": "/^[\+\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"day_sunday": "nullable|boolean",
"day_monday": "nullable|boolean",
"day_tuesday": "nullable|boolean",
"day_wednesday": "nullable|boolean",
"day_thursday": "nullable|boolean",
"day_friday": "nullable|boolean",
"day_saturday": "nullable|boolean"
}
Listar GoodSection
{info} Soporta:
Paginación
Filters
Carga dinámica
| Método |
URI |
Cabeceras |
| GET |
/companies/{companyId}/good-sections |
N/A |
Mostrar GoodSection
{info} Soporta:
Carga dinámica
| Método |
URI |
Cabeceras |
| GET |
/companies/{companyId}/good-sections/{goodSectionId} |
N/A |
Actualizar GoodSection
| Método |
URI |
Cabeceras |
| PATCH |
/companies/{companyId}/good-sections/{goodSectionId} |
Authorization |
{
"name": "string|max:64",
"type": "string|in:custom",
"in_order": "integer|min:0",
"is_featured": "boolean",
"enabled": "boolean",
"good_ids": [
"integer|min:1"
],
"hour_from": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_to": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"date_from": "sometimes|nullable|date",
"date_to": "sometimes|nullable|date|after:date_from",
"tz": {
"string": true,
"regex": "/^[\+\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"day_sunday": "nullable|boolean",
"day_monday": "nullable|boolean",
"day_tuesday": "nullable|boolean",
"day_wednesday": "nullable|boolean",
"day_thursday": "nullable|boolean",
"day_friday": "nullable|boolean",
"day_saturday": "nullable|boolean"
}
Eliminar GoodSection
| Método |
URI |
Cabeceras |
| DELETE |
/companies/{companyId}/good-sections/{goodSectionId} |
Authorization |
Enlaces de GoodSection