mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
14 lines
553 B
Python
14 lines
553 B
Python
from sqlalchemy import Column, Integer, UniqueConstraint
|
|
|
|
from project import db
|
|
from project.models.trackable_mixin import TrackableMixin
|
|
|
|
|
|
class EventReference(db.Model, TrackableMixin):
|
|
__tablename__ = "eventreference"
|
|
__table_args__ = (UniqueConstraint("event_id", "admin_unit_id"),)
|
|
id = Column(Integer(), primary_key=True)
|
|
event_id = db.Column(db.Integer, db.ForeignKey("event.id"), nullable=False)
|
|
admin_unit_id = db.Column(db.Integer, db.ForeignKey("adminunit.id"), nullable=False)
|
|
rating = Column(Integer(), default=50)
|