Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
countertable.php
1<?php
2
4
5use Bitrix\Main\Entity\DataManager;
6
25class CounterTable extends DataManager
26{
27 public static function getTableName(): string
28 {
29 return 'b_sonet_scorer';
30 }
31
32 public static function getClass(): string
33 {
34 return static::class;
35 }
36
37 public static function getMap(): array
38 {
39 return [
40 'ID' => [
41 'data_type' => 'integer',
42 'primary' => true,
43 'autocomplete' => true,
44 ],
45 'USER_ID' => [
46 'data_type' => 'integer',
47 'required' => true,
48 ],
49 'SONET_LOG_ID' => [
50 'data_type' => 'integer',
51 'required' => true,
52 ],
53 'GROUP_ID' => [
54 'data_type' => 'integer',
55 'required' => true,
56 ],
57 'TYPE' => [
58 'data_type' => 'string',
59 'required' => true,
60 ],
61 'VALUE' => [
62 'data_type' => 'integer',
63 'required' => true,
64 ],
65
66 // references
67 'USER' => [
68 'data_type' => 'Bitrix\Main\UserTable',
69 'reference' => ['=this.USER_ID' => 'ref.ID'],
70 ],
71 'GROUP' => [
72 'data_type' => 'Bitrix\Socialnetwork\Workgroup',
73 'reference' => ['=this.GROUP_ID' => 'ref.ID'],
74 ],
75 'SONET_LOG' => [
76 'data_type' => 'Bitrix\Socialnetwork\LogTable',
77 'reference' => ['=this.SONET_LOG_ID' => 'ref.ID'],
78 ],
79 ];
80 }
81}