-
Notifications
You must be signed in to change notification settings - Fork 0
/
Product.php
46 lines (43 loc) · 1.08 KB
/
Product.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Osm\Admin\Samples\Products;
use Osm\Admin\Base\Attributes\Grid;
use Osm\Admin\Base\Attributes\Icon;
use Osm\Core\Object_;
use Osm\Core\Attributes\Serialized;
use Osm\Admin\Base\Attributes\Storage;
use Osm\Admin\Base\Traits\Id;
use Osm\Admin\Base\Traits\SubTypes;
use Osm\Admin\Base\Attributes\Interface_;
use Osm\Admin\Base\Attributes\Form;
use Osm\Admin\Base\Attributes\Table;
/**
* @property string $sku #[
* Serialized,
* Grid\String_('SKU', edit_link: true),
* Form\String_(10, 'SKU'),
* ]
* @property string $title #[
* Serialized,
* Grid\String_('Title', edit_link: true),
* Form\String_(20, 'Title'),
* ]
* @property ?string $description #[
* Serialized,
* Grid\String_('Description'),
* Form\String_(30, 'Description'),
* ]
* @property int $qty #[
* Serialized,
* Grid\Int_('Quantity'),
* Form\Int_(40, 'Quantity'),
* ]
*/
#[
Storage\Table('products'),
Interface_\Table\Admin('/products', 'Product'),
Grid(['sku', 'title', 'qty']),
]
class Product extends Object_
{
use Id, SubTypes;
}