Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
orderprops_group.php
1<?php
9
10use Bitrix\Main\Entity\DataManager,
11 Bitrix\Main\Entity\Validator;
12
30{
31 public static function getFilePath()
32 {
33 return __FILE__;
34 }
35
36 public static function getTableName()
37 {
38 return 'b_sale_order_props_group';
39 }
40
41 public static function getMap()
42 {
43 return array(
44 'ID' => array(
45 'primary' => true,
46 'autocomplete' => true,
47 'data_type' => 'integer',
48 'format' => '/^[0-9]{1,11}$/',
49 ),
50 'PERSON_TYPE_ID' => array(
51 'required' => true,
52 'data_type' => 'integer',
53 'format' => '/^[0-9]{1,11}$/',
54 ),
55 'NAME' => array(
56 'required' => true,
57 'data_type' => 'string',
58 'validation' => array(__CLASS__, 'getNameValidators'),
59 ),
60 'CODE' => array(
61 'data_type' => 'string',
62 'validation' => array(__CLASS__, 'getCodeValidators'),
63 ),
64 'SORT' => array(
65 'data_type' => 'integer',
66 'format' => '/^[0-9]{1,11}$/',
67 ),
68 );
69 }
70
71 public static function getNameValidators()
72 {
73 return array(
74 new Validator\Length(1, 255),
75 );
76 }
77
78 public static function getCodeValidators()
79 {
80 return array(new Validator\Length(null, 50));
81 }
82}