| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/erp/horilla/__pycache__/ |
Upload File : |
o
hͦhv
� @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ ed
e
fdd��Zee
de� G d
d� dej�Zejedd� dS )aX
models.py
=========
This module defines the abstract base model `HorillaModel` for the Horilla HRMS project.
The `HorillaModel` provides common fields and functionalities for other models within
the application, such as tracking creation and modification timestamps and user
information, audit logging, and active/inactive status management.
� )�AuditlogHistoryField)�auditlog)�User)�models)� FieldFile)�reverse)�gettext)�_thread_locals�selfc
C sH z| � � W n ty } z
td�W Y d}~S d}~ww | j�| j�S )z'
Custom url attribute/property
�404N)�
_require_file� Exceptionr �storage�url�name)r
�e� r �/var/www/erp/horilla/models.pyr s ��r c s� e Zd ZdZejddded�d�Zeje ej
ddded�d�Zeje ej
ddded�d d
�Ze
� Ze�� Zejded�d�ZG d
d� d�Z� fdd�Zedd� �Zedd� �Z� ZS )�HorillaModelz
An abstract base model that includes common fields and functionalities
for models within the Horilla application.
Tz
Created At)�auto_now_add�null�blank�verbose_nameFz
Created By)� on_deleter r �editabler zModified Byz%(class)s_modified_by)r r r r r �related_namez Is Active)�defaultr c @ s e Zd ZdZdZdS )zHorillaModel.Metaz-
Meta class for HorillaModel
TN)�__name__�
__module__�__qualname__�__doc__�abstractr r r r �MetaG s r"