53b3fd945a
Database Portability Tests / Integration (mysql) (push) Has been skipped
Database Portability Tests / Integration (postgres) (push) Has been skipped
Database Portability Tests / Integration (sqlite) (push) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (push) Successful in 5s
Database Portability Tests / Unit Tests (PlatformHelper) (push) Failing after 43s
Inventory: - General material, stock items, and sales CRUD - Category management with CategoryPicker component - Inventory reports service - Database migrations and mappers Frontend: - Inventory view with tabs (Allgemeinmaterial, Verkaufsmaterial, Verkäufe) - Forms for general material, stock items, and sales - Search bar fix: flexbox wrapper with inline icon replaces broken NcTextField icon slot Tests: - All 1,491 tests pass (zero errors, warnings, deprecations) - BundleImportServiceTest: fixed ZipArchive empty-file deprecation - BundleImportService: null-coalescing for targetFields - PHPUnit test infra: make test target via container CLAUDE.md: - Added Testing section as PR gating criterion
37 lines
849 B
PHP
37 lines
849 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\Mitgliederverwaltung\Db;
|
|
|
|
use JsonSerializable;
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
/**
|
|
* Join entity linking a general material item to a category.
|
|
*
|
|
* Part of Issue #165 (Inventory Tracking).
|
|
*
|
|
* @method int|null getItemId()
|
|
* @method void setItemId(int $itemId)
|
|
* @method int|null getCategoryId()
|
|
* @method void setCategoryId(int $categoryId)
|
|
*/
|
|
class InventoryItemCategory extends Entity implements JsonSerializable {
|
|
|
|
protected int $itemId = 0;
|
|
protected int $categoryId = 0;
|
|
|
|
public function __construct() {
|
|
$this->addType('itemId', 'integer');
|
|
$this->addType('categoryId', 'integer');
|
|
}
|
|
|
|
public function jsonSerialize(): array {
|
|
return [
|
|
'item_id' => $this->itemId,
|
|
'category_id' => $this->categoryId,
|
|
];
|
|
}
|
|
}
|