o
    ȟ1id                     @   sF   d dl mZmZmZ d dlmZ d dlmZmZ G dd deeZ	dS )    )ColumnInteger
ForeignKey)relationship)BaseTimestampMixinc                   @   s   e Zd ZdZeeddddZeeedddZeeedddZ	eeedddZ
ed	Zed
ZedZedd Zedd Zedd ZdS )CourseAllocationcourse_allocationT)primary_keyautoincrementindexz	course.idF)nullablezstaff.idzroles.idCourseStaffRolec                 C      | j jS N)coursenameself r    /app/models/course_allocation.pycourse_name      zCourseAllocation.course_namec                 C   s   | j j d| j j S )N )staffZ
first_name	last_namer   r   r   r   
staff_name   s   zCourseAllocation.staff_namec                 C   r   r   )rolelabelr   r   r   r   
staff_role   r   zCourseAllocation.staff_roleN)__name__
__module____qualname____tablename__r   r   idr   	course_idZstaff_idZrole_idr   r   r   r   propertyr   r   r!   r   r   r   r   r      s    

r   N)

sqlalchemyr   r   r   sqlalchemy.ormr   models.baser   r   r   r   r   r   r   <module>   s    