Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
storebatchtable.php
1<?php
2namespace Bitrix\Catalog;
3
4use Bitrix\Main\Entity\FloatField;
5use Bitrix\Main\Entity\ReferenceField;
9
27{
33 public static function getTableName(): string
34 {
35 return 'b_catalog_store_batch';
36 }
37
43 public static function getMap(): array
44 {
45 return [
46 new IntegerField(
47 'ID',
48 [
49 'primary' => true,
50 'autocomplete' => true
51 ]
52 ),
53 new IntegerField(
54 "ELEMENT_ID",
55 [
56 'required' => true,
57 ]
58 ),
59 new IntegerField(
60 "STORE_ID",
61 [
62 'required' => true,
63 ]
64 ),
65 new ReferenceField(
66 "STORE",
67 \Bitrix\Catalog\StoreTable::class,
68 ['=this.STORE_ID' => 'ref.ID'],
69 ['join_type' => 'INNER']
70 ),
71 (new FloatField('AVAILABLE_AMOUNT'))
72 ->configureDefaultValue(0.00)
73 ,
74 (new FloatField('PURCHASING_PRICE'))
75 ->configureDefaultValue(0.00)
76 ,
77 (new StringField('PURCHASING_CURRENCY'))
78 ->configureSize(3)
79 ,
80 ];
81 }
82}