Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
xscanresulttable.php
1<?php
2
3namespace Bitrix\Security;
4
6
23class XScanResultTable extends \Bitrix\Main\Entity\DataManager
24{
25 public static function getTableName()
26 {
27 return 'b_sec_xscan_results';
28 }
29
30 public static function getMap()
31 {
32 return array(
33 new \Bitrix\Main\Entity\IntegerField('ID', array('primary' => true, 'autocomplete' => true)),
34 new \Bitrix\Main\Entity\EnumField('TYPE', array(
35 'values' => array('file', 'agent', 'event'),
36 'default_value' => 'file'
37 )),
38 new \Bitrix\Main\Entity\StringField('SRC'),
39 new \Bitrix\Main\Entity\StringField('MESSAGE'),
40 new \Bitrix\Main\Entity\FloatField('SCORE'),
41 new \Bitrix\Main\Entity\DatetimeField('CTIME'),
42 new \Bitrix\Main\Entity\DatetimeField('MTIME'),
43 new \Bitrix\Main\Entity\StringField('TAGS')
44 );
45 }
46
47 public static function getCollectionClass()
48 {
49 return XScanResults::class;
50 }
51
52 public static function getObjectClass()
53 {
54 return XScanResult::class;
55 }
56
57 public static function deleteList(array $filter)
58 {
59 $entity = static::getEntity();
60 $connection = $entity->getConnection();
61
62 $where = Query::buildFilterSql($entity, $filter);
63 $where = $where ? 'WHERE ' . $where : '';
64
65 $sql = sprintf(
66 'DELETE FROM %s %s',
67 $connection->getSqlHelper()->quote($entity->getDbTableName()),
68 $where
69 );
70
71 $res = $connection->query($sql);
72
73 return $res;
74 }
75
76}
77
78class XScanResults extends EO_XScanResult_Collection
79{
80}
81
82class XScanResult extends EO_XScanResult
83{
84}