Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
incomingmessage.php
1<?php
3
10
27{
33 public static function getTableName()
34 {
35 return 'b_messageservice_incoming_message';
36 }
37
43 public static function getMap()
44 {
45 return [
46 'ID' =>
47 (new IntegerField('ID', []))
48 ->configurePrimary(true)
49 ->configureAutocomplete(true),
50 'REQUEST_BODY' =>
51 (new TextField('REQUEST_BODY', [])),
52 'DATE_EXEC' =>
53 (new DatetimeField('DATE_EXEC', [])),
54 'SENDER_ID' =>
55 (new StringField('SENDER_ID', [
56 'validation' => [__CLASS__, 'validateSenderId']
57 ]))
58 ->configureRequired(true),
59 'EXTERNAL_ID' =>
60 (new StringField('EXTERNAL_ID', [
61 'validation' => [__CLASS__, 'validateExternalId']
62 ])),
63 ];
64 }
65
71 public static function validateSenderId(): array
72 {
73 return [
74 new LengthValidator(null, 50),
75 ];
76 }
77
83 public static function validateExternalId(): array
84 {
85 return [
86 new LengthValidator(null, 128),
87 ];
88 }
89}