U
    à/dÿ  ã                   @   sT   d dl mZ d dlmZ d dlZd dlmZ G dd„ dejƒZG dd„ dej	ƒZ
dS )	é    )Úmodels)ÚUniqueConstraintN)ÚWorkspaceUserc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )Ú	ULIDFieldc                    s   d|d< t t| ƒj||Ž d S )Né   Ú
max_length)Úsuperr   Ú__init__)ÚselfÚargsÚkwargs©Ú	__class__© úBC:\Users\offic\Desktop\PIM\XCMS_PIM\app\models\attributes_model.pyr	      s    zULIDField.__init__c                 C   s   dS )Nzchar(26)r   )r
   Ú
connectionr   r   r   Údb_type   s    zULIDField.db_type)Ú__name__Ú
__module__Ú__qualname__r	   r   Ú__classcell__r   r   r   r   r      s   r   c                   @   s2  e Zd Zee ¡ dd�Zejdd�Z	ejdd�Z
ejdd�Zejdd�Zejdd�Zejdd�Ze ¡ Zejdd�Zejdd�Zejdd�Ze ¡ Zejdd�Zejdd�Zejdd�Zejdd�Zejdd�Zejdd�Zejdd	�Zejdd
�Zejedej ddd�Z!ejedej ddd�Z"G dd„ dƒZ#dS )ÚAttributesModelT)ÚdefaultÚprimary_keyé   )r   é   i   éd   é-   )Úauto_now_add)Úauto_nowZcreated_attributesÚuser_uidÚ
created_by)Úrelated_nameÚ	on_deleteÚto_fieldÚ	db_columnZupdated_attributesÚ
updated_byc                   @   s0   e Zd ZdZdZedgdd� edgdd� dS )	zAttributesModel.MetaFZattributes_tÚcdZattrib_unique)ÚfieldsÚnamer)   Zattrib_unique_nameN)r   r   r   ÚmanagedÚdb_tabler   r   r   r   r   ÚMeta4   s   r,   N)$r   r   r   r   ÚulidÚnewr'   r   Ú	CharFieldr)   Ú
is_deletedÚis_fixedÚ	is_commonÚis_with_unitÚ
is_privateÚIntegerFieldÚorderÚalternative_nameÚcontrol_typeÚnot_nullr   Úselect_listÚdefault_valueÚunitÚoption1Úoption2Úoption3ÚDateTimeFieldÚ
created_atÚ
updated_atÚ
ForeignKeyr   Ú
DO_NOTHINGr!   r&   r,   r   r   r   r   r      sF   ûûr   )Ú	django.dbr   Údjango.db.models.constraintsr   r-   ÚXCMS_PIM.modelsr   r/   r   ÚModelr   r   r   r   r   Ú<module>   s
   	