
    撾i<                     J    d Z ddlmZ ddlmZ  G d dej
                        Zy)zN
Face record model with pgvector embedding field for ArcFace 512-dim vectors.
    )models)VectorFieldc                       e Zd ZdZ ej
                  d      Z ej                  d      Z e	d      Z
 ej                  d	      Z ej                  ed
      Z G d d      Zd Zy)
FaceRecordzJStores a registered face with its ArcFace embedding for similarity search.   )
max_lengthzfaces/)	upload_toi   )
dimensionsT)auto_now_add)defaultblankc                       e Zd ZdZdgZg Zy)FaceRecord.Metafaces_facerecordz-created_atN)__name__
__module____qualname__db_tableorderingindexes     )/var/www/face-recognition/faces/models.pyMetar      s    %!?r   r   c                 :    | j                    d| j                   dS )Nz ())nameid)selfs    r   __str__zFaceRecord.__str__   s    ))Btwwiq))r   N)r   r   r   __doc__r   	CharFieldr   
ImageFieldphotor   	embeddingDateTimeField
created_at	JSONFielddictmetadatar   r    r   r   r   r   r   	   sh    T6s+DF1Es+I%%%48JvD9H *r   r   N)r!   	django.dbr   pgvector.djangor   Modelr   r   r   r   <module>r.      s"     '* *r   