[31188f42] einfügen
einfügen
This commit is contained in:
@@ -157,17 +157,24 @@ class Industry(Base):
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
|
||||
class JobRoleMapping(Base):
|
||||
class JobRolePattern(Base):
|
||||
"""
|
||||
Maps job title patterns (regex or simple string) to Roles.
|
||||
Maps job title patterns (regex or exact string) to internal Roles.
|
||||
"""
|
||||
__tablename__ = "job_role_mappings"
|
||||
__tablename__ = "job_role_patterns"
|
||||
|
||||
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
|
||||
|
||||
pattern_type = Column(String, default="exact", index=True) # 'exact' or 'regex'
|
||||
pattern_value = Column(String, unique=True) # e.g. "Technischer Leiter" or "(?i)leiter.*technik"
|
||||
role = Column(String, index=True) # The target Role, maps to Persona.name
|
||||
priority = Column(Integer, default=100) # Lower number means higher priority
|
||||
|
||||
is_active = Column(Boolean, default=True)
|
||||
created_by = Column(String, default="system") # 'system', 'user', 'llm'
|
||||
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
class RawJobTitle(Base):
|
||||
"""
|
||||
@@ -196,7 +203,7 @@ class Persona(Base):
|
||||
__tablename__ = "personas"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String, unique=True, index=True) # Matches the 'role' string in JobRoleMapping
|
||||
name = Column(String, unique=True, index=True) # Matches the 'role' string in JobRolePattern
|
||||
|
||||
pains = Column(Text, nullable=True) # JSON list or multiline string
|
||||
gains = Column(Text, nullable=True) # JSON list or multiline string
|
||||
|
||||
Reference in New Issue
Block a user