403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/Copilot/Model/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/Copilot/Model/RequestsTable.php
<?php
declare(strict_types=1);

namespace Bitrix\Landing\Copilot\Model;

use Bitrix\Landing\Copilot\Model\Helper\EmojiDataProcessor;
use Bitrix\Main\Entity;
use Bitrix\Main\ORM\Fields;
use Bitrix\Main\ORM\Query;
use Bitrix\Main\Type\DateTime;

/**
 * Class RequestsTable
 *
 * DO NOT WRITE ANYTHING BELOW THIS
 *
 * <<< ORMENTITYANNOTATION
 * @method static EO_Requests_Query query()
 * @method static EO_Requests_Result getByPrimary($primary, array $parameters = [])
 * @method static EO_Requests_Result getById($id)
 * @method static EO_Requests_Result getList(array $parameters = [])
 * @method static EO_Requests_Entity getEntity()
 * @method static \Bitrix\Landing\Copilot\Model\EO_Requests createObject($setDefaultValues = true)
 * @method static \Bitrix\Landing\Copilot\Model\EO_Requests_Collection createCollection()
 * @method static \Bitrix\Landing\Copilot\Model\EO_Requests wakeUpObject($row)
 * @method static \Bitrix\Landing\Copilot\Model\EO_Requests_Collection wakeUpCollection($rows)
 */
class RequestsTable extends Entity\DataManager
{
	/**
	 * @inheritdoc
	 */
	public static function getTableName(): string
	{
		return 'b_landing_copilot_requests';
	}

	/**
	 * @inheritdoc
	 */
	public static function getMap(): array
	{
		return [
			(new Fields\IntegerField('ID'))
				->configurePrimary()
				->configureAutocomplete()
			,
			(new Fields\IntegerField('GENERATION_ID'))
				->configureTitle('ID or relation generation')
				->configureRequired()
			,
			(new Fields\StringField('HASH'))
				->configureTitle('Hash of AI-request')
			,
			(new Fields\ArrayField('RESULT'))
				->configureTitle('Result of AI-request')
				->configureNullable()
				->configureSerializationPhp()
				->addSaveDataModifier([EmojiDataProcessor::class, 'encode'])
				->addFetchDataModifier([EmojiDataProcessor::class, 'decode'])
			,
			(new Fields\ArrayField('ERROR'))
				->configureTitle('Error of AI-request')
				->configureNullable()
				->configureSerializationPhp()
			,
			(new Fields\BooleanField('DELETED'))
				->configureTitle('If request was deleted')
				->configureRequired()
				->configureStorageValues('N', 'Y')
				->configureDefaultValue(false)
			,
			(new Fields\DatetimeField('DATE_CREATE'))
				->configureRequired()
				->configureDefaultValue(function () {
					return new DateTime();
				})
			,
			(new Fields\DatetimeField('DATE_RECEIVE'))
				->configureTitle('When the response was received')
				->configureNullable()
			,
			(new Fields\Relations\Reference(
				'STEP_REF',
				RequestToStepTable::class,
				Query\Join::on('this.ID', 'ref.REQUEST_ID')
			)),
		];
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit