Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
bloguser.php
1<?php
3
6use \Bitrix\Main\NotImplementedException;
7
8Loc::loadMessages(__FILE__);
9
10
27class BlogUserTable extends Entity\DataManager
28{
29 public static function getTableName()
30 {
31 return 'b_blog_user';
32 }
33
34 public static function getMap()
35 {
36 return array(
37 new Entity\IntegerField('ID', array(
38 'primary' => true,
39 'autocomplete' => true,
40 )),
41
42 new Entity\IntegerField('USER_ID', array(
43 'required' => true,
44 )),
45
46 new Entity\StringField('ALIAS', array(
47 'required' => false,
48 'validation' => array(__CLASS__, 'validateAlias'),
49 )),
50
51 new Entity\TextField('DESCRIPTION', array(
52 'required' => false,
53 )),
54
55 new Entity\IntegerField('AVATAR', array(
56 'required' => false,
57 )),
58
59 new Entity\StringField('INTERESTS', array(
60 'required' => false,
61 'validation' => array(__CLASS__, 'validateInterests'),
62 )),
63
64 new Entity\DatetimeField('LAST_VISIT', array(
65 'required' => false,
66 )),
67
68 new Entity\DatetimeField('DATE_REG', array(
69 'required' => true,
70 )),
71
72 new Entity\BooleanField('ALLOW_POST', array(
73 'required' => true,
74 'values' => array('N', 'Y'),
75 )),
76
77 new Entity\ReferenceField(
78 'USER',
79 'Bitrix\Main\UserTable',
80 array('=this.USER_ID' => 'ref.ID')
81 ),
82 );
83 }
84
90 public static function validateAlias()
91 {
92 return array(
93 new Entity\Validator\Length(NULL, 255),
94 );
95 }
96
102 public static function validateInterests()
103 {
104 return array(
105 new Entity\Validator\Length(NULL, 255),
106 );
107 }
108
109 public static function add(array $data)
110 {
111 throw new NotImplementedException("Use CBlogUser class.");
112 }
113
114 public static function update($primary, array $data)
115 {
116 throw new NotImplementedException("Use CBlogUser class.");
117 }
118
119 public static function delete($primary)
120 {
121 throw new NotImplementedException("Use CBlogUser class.");
122 }
123}
static update($primary, array $data)
Definition bloguser.php:114
static loadMessages($file)
Definition loc.php:64