Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
operation.php
1<?php
2
3namespace Bitrix\Main;
4
5use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
6
23class OperationTable extends Entity\DataManager
24{
25 use DeleteByFilterTrait;
26
27 public static function getTableName()
28 {
29 return 'b_operation';
30 }
31
32 public static function getMap()
33 {
34 return array(
35 'ID' => array(
36 'data_type' => 'integer',
37 'primary' => true,
38 'autocomplete' => true,
39 ),
40 'NAME' => array(
41 'data_type' => 'string',
42 'required' => true,
43 'validation' => array(__CLASS__, 'validateName'),
44 ),
45 'MODULE_ID' => array(
46 'data_type' => 'string',
47 'required' => true,
48 'validation' => array(__CLASS__, 'validateModuleId'),
49 ),
50 'DESCRIPTION' => array(
51 'data_type' => 'string',
52 'validation' => array(__CLASS__, 'validateDescription'),
53 ),
54 'BINDING' => array(
55 'data_type' => 'string',
56 'validation' => array(__CLASS__, 'validateBinding'),
57 ),
58 );
59 }
60
61 public static function validateName()
62 {
63 return array(
64 new Entity\Validator\Length(null, 50),
65 );
66 }
67
68 public static function validateModuleId()
69 {
70 return array(
71 new Entity\Validator\Length(null, 50),
72 );
73 }
74
75 public static function validateDescription()
76 {
77 return array(
78 new Entity\Validator\Length(null, 255),
79 );
80 }
81
82 public static function validateBinding()
83 {
84 return array(
85 new Entity\Validator\Length(null, 50),
86 );
87 }
88}