Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
storebarcode.php
1
<?php
2
namespace
Bitrix\Catalog
;
3
4
use
Bitrix\Main
,
5
Bitrix\Main\Localization\Loc
;
6
Loc::loadMessages
(__FILE__);
7
44
class
StoreBarcodeTable
extends
Main\ORM\Data\DataManager
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
[
79
new
Main\ORM\Fields\Validators\LengthValidator
(
null
, 100),
80
new
Main\ORM\Fields\Validators\UniqueValidator
(
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
)),
105
'PRODUCT'
=>
new
Main\ORM\Fields\Relations\Reference
(
106
'PRODUCT'
,
107
'\Bitrix\Catalog\Product'
,
108
array(
'=this.PRODUCT_ID'
=>
'ref.ID'
),
109
array(
'join_type'
=>
'LEFT'
)
110
),
111
'STORE'
=>
new
Main\ORM\Fields\Relations\Reference
(
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
}
Bitrix\Catalog\StoreBarcodeTable
Definition
storebarcode.php:45
Bitrix\Catalog\StoreBarcodeTable\getMap
static getMap()
Definition
storebarcode.php:61
Bitrix\Catalog\StoreBarcodeTable\getTableName
static getTableName()
Definition
storebarcode.php:51
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\DatetimeField
Definition
datetimefield.php:22
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\Reference
Definition
reference.php:26
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\ORM\Fields\Validators\UniqueValidator
Definition
uniquevalidator.php:18
Bitrix\Sale\Internals\Fields
Definition
fields.php:6
Bitrix\Catalog
Bitrix\Main
modules
catalog
lib
storebarcode.php
Создано системой
1.10.0