<?php

defined('HOSTCMS') || exit('HostCMS: access denied.');

/**
 * Company_Department_Module_Model
 *
 * @package HostCMS
 * @subpackage Company
 * @version 6.x
 * @copyright © 2005-2024, https://www.hostcms.ru
 */
class Company_Department_Module_Model extends Core_Entity
{
	/**
	 * Disable markDeleted()
	 * @var mixed
	 */
	protected $_marksDeleted = NULL;

	/**
	 * Belongs to relations
	 * @var array
	 */
	protected $_belongsTo = array(
		'company_department' => array(),
		'module' => array(),
		'site' => array(),
		'user' => array()
	);

	/**
	 * Constructor.
	 * @param int $id entity ID
	 */
	public function __construct($id = NULL)
	{
		parent::__construct($id);

		if (is_null($id) && !$this->loaded())
		{
			$oUser = Core_Auth::getCurrentUser();
			$this->_preloadValues['user_id'] = is_null($oUser) ? 0 : $oUser->id;
		}
	}
}