feat(ce): upgrade to v0.5.0 with contacts management, advanced settings and ui modernization
This commit is contained in:
@@ -46,6 +46,65 @@ class Company(Base):
|
||||
# Relationships
|
||||
signals = relationship("Signal", back_populates="company", cascade="all, delete-orphan")
|
||||
enrichment_data = relationship("EnrichmentData", back_populates="company", cascade="all, delete-orphan")
|
||||
contacts = relationship("Contact", back_populates="company", cascade="all, delete-orphan")
|
||||
|
||||
|
||||
class Contact(Base):
|
||||
"""
|
||||
Represents a person associated with a company.
|
||||
"""
|
||||
__tablename__ = "contacts"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
company_id = Column(Integer, ForeignKey("companies.id"), index=True)
|
||||
|
||||
gender = Column(String) # "männlich", "weiblich"
|
||||
title = Column(String, default="") # "Dr.", "Prof."
|
||||
first_name = Column(String)
|
||||
last_name = Column(String)
|
||||
email = Column(String, index=True)
|
||||
job_title = Column(String) # Visitenkarten-Titel
|
||||
language = Column(String, default="De") # "De", "En"
|
||||
|
||||
role = Column(String) # Operativer Entscheider, etc.
|
||||
status = Column(String, default="") # Marketing Status
|
||||
|
||||
is_primary = Column(Boolean, default=False)
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
company = relationship("Company", back_populates="contacts")
|
||||
|
||||
|
||||
class Industry(Base):
|
||||
"""
|
||||
Represents a specific industry vertical (Branche).
|
||||
"""
|
||||
__tablename__ = "industries"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String, unique=True, index=True)
|
||||
description = Column(Text, nullable=True) # Abgrenzung
|
||||
is_focus = Column(Boolean, default=False)
|
||||
|
||||
# Optional link to a Robotics Category (the "product" relevant for this industry)
|
||||
primary_category_id = Column(Integer, ForeignKey("robotics_categories.id"), nullable=True)
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
|
||||
class JobRoleMapping(Base):
|
||||
"""
|
||||
Maps job title patterns (regex or simple string) to Roles.
|
||||
"""
|
||||
__tablename__ = "job_role_mappings"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
pattern = Column(String, unique=True) # e.g. "%CTO%" or "Technischer Leiter"
|
||||
role = Column(String) # The target Role
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
|
||||
class Signal(Base):
|
||||
|
||||
Reference in New Issue
Block a user