Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
b24integrationtokentable.php
1<?php
3
4
9
27{
28 public static function getTableName()
29 {
30 return 'b_sale_b24integration_token';
31 }
32
33 public static function getObjectClass()
34 {
35 return Entity\Token::class;
36 }
37
41 public static function getMap()
42 {
43 return [
44 new Fields\IntegerField("ID", [
45 "primary" => true,
46 "autocomplete" => true
47 ]),
48 new Fields\StringField("GUID", [
49 "required" => false
50 ]),
51 new Fields\StringField("ACCESS_TOKEN", [
52 "required" => true
53 ]),
54 new Fields\StringField("REFRESH_TOKEN", [
55 "required" => true
56 ]),
57 new Fields\StringField("REST_ENDPOINT", [
58 "required" => true
59 ]),
60 new Fields\StringField("PORTAL_ID", [
61 "required" => true
62 ]),
63 new Fields\DatetimeField("CREATED", [
64 "required" => true,
65 "default_value" => new DateTime()
66 ]),
67 new Fields\DatetimeField("CHANGED", [
68 "required" => true,
69 "default_value" => new DateTime()
70 ]),
71 new Fields\DatetimeField("EXPIRES", [
72 "required" => true,
73 "default_value" => (new DateTime())->add("1 hour")
74 ])
75 ];
76 }
77}