Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
storebarcode.php
1<?php
2namespace Bitrix\Catalog;
3
6Loc::loadMessages(__FILE__);
7
45{
51 public static function getTableName()
52 {
53 return 'b_catalog_store_barcode';
54 }
55
61 public static function getMap()
62 {
63 return array(
64 'ID' => new Main\ORM\Fields\IntegerField('ID', array(
65 'primary' => true,
66 'autocomplete' => true,
67 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_ID_FIELD')
68 )),
69 'PRODUCT_ID' => new Main\ORM\Fields\IntegerField('PRODUCT_ID', array(
70 'required' => true,
71 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_PRODUCT_ID_FIELD')
72 )),
73 'BARCODE' => new Main\ORM\Fields\StringField('BARCODE', array(
74 'required' => true,
75 'unique' => true,
76 'validation' => function()
77 {
78 return [
81 Loc::getMessage("STORE_BARCODE_ENTITY_BARCODE_IS_NOT_UNIQUE")
82 ),
83 ];
84 },
85 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_BARCODE_FIELD')
86 )),
87 'STORE_ID' => new Main\ORM\Fields\IntegerField('STORE_ID', array(
88 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_STORE_ID_FIELD')
89 )),
90 'ORDER_ID' => new Main\ORM\Fields\IntegerField('ORDER_ID', array(
91 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_ORDER_ID_FIELD')
92 )),
93 'DATE_MODIFY' => new Main\ORM\Fields\DatetimeField('DATE_MODIFY', array(
94 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_DATE_MODIFY_FIELD')
95 )),
96 'DATE_CREATE' => new Main\ORM\Fields\DatetimeField('DATE_CREATE', array(
97 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_DATE_CREATE_FIELD')
98 )),
99 'CREATED_BY' => new Main\ORM\Fields\IntegerField('CREATED_BY', array(
100 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_CREATED_BY_FIELD')
101 )),
102 'MODIFIED_BY' => new Main\ORM\Fields\IntegerField('MODIFIED_BY', array(
103 'title' => Loc::getMessage('STORE_BARCODE_ENTITY_MODIFIED_BY_FIELD')
104 )),
106 'PRODUCT',
107 '\Bitrix\Catalog\Product',
108 array('=this.PRODUCT_ID' => 'ref.ID'),
109 array('join_type' => 'LEFT')
110 ),
112 'STORE',
113 '\Bitrix\Catalog\Store',
114 array('=this.STORE_ID' => 'ref.ID'),
115 array('join_type' => 'LEFT')
116 ),
117 'CREATED_BY_USER' => new Main\ORM\Fields\Relations\Reference(
118 'CREATED_BY_USER',
119 '\Bitrix\Main\User',
120 array('=this.CREATED_BY' => 'ref.ID')
121 ),
122 'MODIFIED_BY_USER' => new Main\ORM\Fields\Relations\Reference(
123 'MODIFIED_BY_USER',
124 '\Bitrix\Main\User',
125 array('=this.MODIFIED_BY' => 'ref.ID')
126 )
127 );
128 }
129}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29