[2ff88f42] einfügen

einfügen
This commit is contained in:
2026-02-20 13:25:21 +00:00
parent 653bd79e1f
commit 101f67936a
5 changed files with 188 additions and 20 deletions

View File

@@ -150,7 +150,7 @@ class Industry(Base):
created_at = Column(DateTime, default=datetime.utcnow)
class JobRoleMapping(Base):
class JobRoleMapping(BaseModel):
"""
Maps job title patterns (regex or simple string) to Roles.
"""
@@ -162,7 +162,25 @@ class JobRoleMapping(Base):
created_at = Column(DateTime, default=datetime.utcnow)
class Persona(Base):
class RawJobTitle(BaseModel):
"""
Stores raw unique job titles imported from CRM to assist in pattern mining.
Tracks frequency to prioritize high-impact patterns.
"""
__tablename__ = "raw_job_titles"
id = Column(Integer, primary_key=True, index=True)
title = Column(String, unique=True, index=True) # The raw string, e.g. "Senior Sales Mgr."
count = Column(Integer, default=1) # How often this title appears in the CRM
source = Column(String, default="import")
# Status Flags
is_mapped = Column(Boolean, default=False) # True if a pattern currently covers this title
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
class Persona(BaseModel):
"""
Represents a generalized persona/role (e.g. 'Geschäftsführer', 'IT-Leiter')
independent of the specific job title pattern.