[2ff88f42] multiplikation vorbereitet

multiplikation vorbereitet
This commit is contained in:
2026-02-19 20:59:04 +00:00
parent 95b80f0bbc
commit f65df42f55
15 changed files with 982 additions and 27 deletions

View File

@@ -162,6 +162,23 @@ class JobRoleMapping(Base):
created_at = Column(DateTime, default=datetime.utcnow)
class Persona(Base):
"""
Represents a generalized persona/role (e.g. 'Geschäftsführer', 'IT-Leiter')
independent of the specific job title pattern.
Stores the strategic messaging components.
"""
__tablename__ = "personas"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, unique=True, index=True) # Matches the 'role' string in JobRoleMapping
pains = Column(Text, nullable=True) # JSON list or multiline string
gains = Column(Text, nullable=True) # JSON list or multiline string
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
class Signal(Base):
"""
@@ -254,8 +271,8 @@ class ReportedMistake(Base):
class MarketingMatrix(Base):
"""
Stores the static marketing texts for Industry x Role combinations.
Source: Notion (synced).
Stores the static marketing texts for Industry x Persona combinations.
Source: Generated via AI.
"""
__tablename__ = "marketing_matrix"
@@ -263,7 +280,7 @@ class MarketingMatrix(Base):
# The combination keys
industry_id = Column(Integer, ForeignKey("industries.id"), nullable=False)
role_id = Column(Integer, ForeignKey("job_role_mappings.id"), nullable=False)
persona_id = Column(Integer, ForeignKey("personas.id"), nullable=False)
# The Content
subject = Column(Text, nullable=True)
@@ -273,7 +290,7 @@ class MarketingMatrix(Base):
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
industry = relationship("Industry")
role = relationship("JobRoleMapping")
persona = relationship("Persona")
# ==============================================================================
@@ -329,4 +346,4 @@ def get_db():
try:
yield db
finally:
db.close()
db.close()