#######################################################
# 
# Detail.py
# Python implementation of the Class Detail
# Generated by Enterprise Architect
# Created on:      26-Sep-2020 9:41:25 PM
# Original author: natha
# 
#######################################################
from sqlalchemy import Column, ForeignKey
from FreeTAKServer.model.SQLAlchemy.Root import Base
from sqlalchemy import String
from sqlalchemy.orm import relationship
import FreeTAKServer.model.SQLAlchemy.CoTTables.Archive
import FreeTAKServer.model.SQLAlchemy.CoTTables._Group
import FreeTAKServer.model.SQLAlchemy.CoTTables.Chat
import FreeTAKServer.model.SQLAlchemy.CoTTables.Color
import FreeTAKServer.model.SQLAlchemy.CoTTables.Contact
import FreeTAKServer.model.SQLAlchemy.CoTTables.Dest
import FreeTAKServer.model.SQLAlchemy.CoTTables.Emergency
import FreeTAKServer.model.SQLAlchemy.CoTTables.Link
import FreeTAKServer.model.SQLAlchemy.CoTTables.Marti
import FreeTAKServer.model.SQLAlchemy.CoTTables.Precisionlocation
import FreeTAKServer.model.SQLAlchemy.CoTTables.Remarks
import FreeTAKServer.model.SQLAlchemy.CoTTables.Serverdestination
import FreeTAKServer.model.SQLAlchemy.CoTTables.Status
import FreeTAKServer.model.SQLAlchemy.CoTTables.Summary
import FreeTAKServer.model.SQLAlchemy.CoTTables.Takv
import FreeTAKServer.model.SQLAlchemy.CoTTables.Track
import FreeTAKServer.model.SQLAlchemy.CoTTables.Uid
import FreeTAKServer.model.SQLAlchemy.CoTTables.Usericon



class Detail(Base):
# default constructor  def __init__(self):
    __tablename__ = 'Detail'
    PrimaryKey = Column(ForeignKey("Event.uid"), primary_key=True)
    # Event = relationship("Event", back_populates="detail")
    xmlString = Column(String)
    archive = relationship("Archive", uselist=False, cascade="all, delete")
    _group = relationship("_Group", uselist=False, back_populates="Detail", cascade="all, delete")
    chat = relationship("Chat", uselist=False, cascade="all, delete")
    color = relationship("Color", uselist=False, cascade="all, delete")
    contact = relationship("Contact", back_populates="Detail", uselist=False, cascade="all, delete")
    emergency = relationship("Emergency", uselist=False, cascade="all, delete")
    link = relationship("Link", back_populates="Detail", uselist=False, cascade="all, delete")
    marti = relationship("Marti", uselist=False, cascade="all, delete")
    precisionlocation = relationship("Precisionlocation", uselist=False, cascade="all, delete")
    remarks = relationship("Remarks", uselist=False, cascade="all, delete")
    serverdestination = relationship("Serverdestination", uselist=False, cascade="all, delete")
    status = relationship("Status", uselist=False, cascade="all, delete")
    summary = relationship("Summary", back_populates="Detail", uselist=False, cascade="all, delete")
    takv = relationship("Takv", uselist=False, cascade="all, delete")
    track = relationship("Track", uselist=False, cascade="all, delete")
    uid = relationship("Uid", uselist=False, cascade="all, delete")
    usericon = relationship("Usericon", uselist=False, cascade="all, delete")

