HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/buyercall/blueprints/email/__pycache__/serializers.cpython-310.pyc
o

we��@svddlmZddlmZmZmZddlmZmZddl	m
Z
Gdd�dej�ZGdd�dej�Z
Gd	d
�d
ej�ZdS)�)�ma)�Email�
EmailTemplate�
EmailIdentity)�Partnership�PartnershipAccount)�generate_presigned_file_urlc@seZdZGdd�d�ZdS)�EmailSchemac@�eZdZeZdgZdS)zEmailSchema.Meta�idN)�__name__�
__module__�__qualname__r�model�exclude�rr�H/home/arjun/projects/buyercall/buyercall/blueprints/email/serializers.py�Meta�
rN)rr
rrrrrrr	sr	c@s�eZdZe�d�Ze�d�Ze�d�Zejdd�Z	ejdd�Z
ejdd�Zejdd�Z
Gd	d
�d
�Zdd�Zd
d�Zdd�ZdS)�EmailTemplateSchema�get_partnership�get_partnership_account�get_template_image�
created_on)�	attribute�
updated_on�	is_active�is_plaintextc@seZdZeZgd�ZdS)zEmailTemplateSchema.Meta)rrrrrN)rr
rrrrrrrrrsrcC�t�|j�S�N)r�get_sid_from_id�partnership_id��self�objrrrr�z#EmailTemplateSchema.get_partnershipcCrr)rr �partnership_account_idr"rrrrr%z+EmailTemplateSchema.get_partnership_accountcCs2|jrd|jvr|j�d�\}}t||�}|SdS)Nz::)�image�splitr)r#r$�bucket_name�key�template_imagerrrr s

z&EmailTemplateSchema.get_template_imageN)rr
rr�Method�partnership�partnership_accountr'�DateTime�dateCreated�dateUpdated�Boolean�isActive�isPlainEmailrrrrrrrrr
s


rc@s,eZdZe�d�ZGdd�d�Zdd�ZdS)�EmailIdentitySchema�	get_emailc@r
)zEmailIdentitySchema.MetarN)rr
rrrrrrrrr,rrcCs|j�d|j��S)N�@)�username�domainr"rrrr60szEmailIdentitySchema.get_emailN)rr
rrr,�emailrr6rrrrr5)s
r5N)�buyercall.extensionsr�!buyercall.blueprints.email.modelsrrr�'buyercall.blueprints.partnership.modelsrr�buyercall.lib.util_boto3_s3r�SQLAlchemyAutoSchemar	rr5rrrr�<module>s