Edit File: 128_move_cleanup_storage_files.cpython-311.opt-1.pyc
� �*vh� � � � d dl Z d dlZd dlZd dlmZmZ d dlmZ d dlm Z ej ddd�� � Z e j e � � Zd� Zd � Zd d�Zd d�ZdS )� N)� CharField�Model)�importer)� FilenameFieldzimav.malwarelib.cleanup.storage�CleanupStorage)�module�name�defaultc �2 � � G � fd�dt � � }|S )zl Model stub for migration because we can't use migrator.orm[] due to custom field FilenameField c � �� e Zd Z G � fd�d� � Z ed�� � Z ed�� � Z ed�� � Z ed�� � Z e defd�� � ZdS ) �get_model.<locals>.MalwareHitc � �� e Zd ZdZ� ZdS )�"get_model.<locals>.MalwareHit.Meta�malware_hitsN)�__name__� __module__�__qualname__�db_table�database��dbs ��n/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/128_move_cleanup_storage_files.py�Metar s �� � � � � �%�H��H�H�H� r F)�nullT�returnc � � t j j � | j | j | j g� � S # t $ r Y dS w xY w)zZ Get file name for cleanup storage :return: file name N)�os�path�extsep�join�user�hash�size� TypeError)�selfs r �storage_namez*get_model.<locals>.MalwareHit.storage_name# sN � � ��w�~�*�*�D�I�t�y�$�)�+L�M�M�M��� � � ��t�t� ���s �58 � A�AN) r r r r r r"