
    jJh                     v    d dl mZ d dlmZ d dlmZ d dlmZ  G d de      Z	 G d deej                        Zy	)
    )absolute_import)Query)db)TimestampMixinc                       e Zd Zd Zd Zy)CohortDetailsQueryc                 F    | j                  t        j                  |k(        S N)filterCohortDetails	cohort_id)selfr   s     6/var/www/dostadmin/dostadmin/db_model/cohortdetails.pyget_by_cohort_idz#CohortDetailsQuery.get_by_cohort_id   s    {{=22i?@@    c                 b    | j                  t        j                  |k(        j                         S r
   )r   r   user_idfirst)r   r   s     r   get_by_user_idz!CohortDetailsQuery.get_by_user_id   s%    {{=00G;<BBDDr   N)__name__
__module____qualname__r   r    r   r   r   r      s    AEr   r   c                      e Zd ZdZeZ ej                  ej                  d      Z	 ej                  ej                   ej                  d            Z ej                  ej                   ej                  d            Zy)r   cohortdetailsT)primary_keyz	cohort.idzusers.idN)r   r   r   __tablename__r   query_classr   ColumnIntegerid
ForeignKeyr   r   r   r   r   r   r      sd    #M$K	2::4	0B		"**mbmmK&@AIbii

MBMM*$=>Gr   r   N)
__future__r   flask_sqlalchemy.queryr   	BaseQuery	dostadminr   dostadmin.mixinsr   r   Modelr   r   r   r   <module>r)      s1    & 5  +E E?NBHH ?r   