Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
task.php
1<?php
2
3namespace Bitrix\Main;
4
5use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
6
23class TaskTable extends Entity\DataManager
24{
25 use DeleteByFilterTrait;
26
27 public static function getTableName()
28 {
29 return 'b_task';
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 'LETTER' => array(
46 'data_type' => 'string',
47 'validation' => array(__CLASS__, 'validateLetter'),
48 ),
49 'MODULE_ID' => array(
50 'data_type' => 'string',
51 'required' => true,
52 'validation' => array(__CLASS__, 'validateModuleId'),
53 ),
54 'SYS' => array(
55 'data_type' => 'string',
56 'required' => true,
57 'validation' => array(__CLASS__, 'validateSys'),
58 ),
59 'DESCRIPTION' => array(
60 'data_type' => 'string',
61 'validation' => array(__CLASS__, 'validateDescription'),
62 ),
63 'BINDING' => array(
64 'data_type' => 'string',
65 'validation' => array(__CLASS__, 'validateBinding'),
66 ),
67 );
68 }
69
70 public static function validateName()
71 {
72 return array(
73 new Entity\Validator\Length(null, 100),
74 );
75 }
76
77 public static function validateLetter()
78 {
79 return array(
80 new Entity\Validator\Length(null, 1),
81 );
82 }
83
84 public static function validateModuleId()
85 {
86 return array(
87 new Entity\Validator\Length(null, 50),
88 );
89 }
90
91 public static function validateSys()
92 {
93 return array(
94 new Entity\Validator\Length(null, 1),
95 );
96 }
97
98 public static function validateDescription()
99 {
100 return array(
101 new Entity\Validator\Length(null, 255),
102 );
103 }
104
105 public static function validateBinding()
106 {
107 return array(
108 new Entity\Validator\Length(null, 50),
109 );
110 }
111}
static getMap()
Definition task.php:32
static validateDescription()
Definition task.php:98
static validateBinding()
Definition task.php:105
static validateSys()
Definition task.php:91
static validateName()
Definition task.php:70
static validateModuleId()
Definition task.php:84
static validateLetter()
Definition task.php:77
static getTableName()
Definition task.php:27