[2ff88f42] multiplikation vorbereitet
multiplikation vorbereitet
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user