class DatahubContact(BaseModel): __tablename__ = 'datahub_contact' __table_args__ = {'schema': 'public'} id = _col(_int, primary_key=True, autoincrement=True) datahub_contact_id = _col(_uuid(as_uuid=True), unique=True) datahub_company_id = _col(_uuid(as_uuid=True)) email = _col(_text)
class DatahubOmis(BaseModel): __tablename__ = 'datahub_omis' __table_args__ = {'schema': 'public'} id = _col(_int, primary_key=True, autoincrement=True) datahub_omis_order_id = _col(_uuid(as_uuid=True), unique=True) company_id = _col(_uuid(as_uuid=True)) created_date = _col(_dt) market = _col(_text) sector = _col(_text)
class DatahubCompanyExportCountry(BaseModel): __tablename__ = 'datahub_company_export_country' __table_args__ = {'schema': 'public'} id = _col(_int, primary_key=True, autoincrement=True) company_export_country_id = _col(_uuid(as_uuid=True)) company_id = _col(_uuid(as_uuid=True)) country = _col(_text) country_iso_alpha2_code = _col(_text) created_on = _col(_dt) modified_on = _col(_dt) status = _col(_text)
class InteractionsExportCountry(BaseModel): __tablename__ = 'interactions_export_country' id = _col(_int, primary_key=True, autoincrement=True) country_iso_alpha2_code = _col(_text) country_name = _col(_text) created_on = _col(_dt) datahub_company_id = _col(_uuid(as_uuid=True)) datahub_interaction_export_country_id = _col(_uuid(as_uuid=True), unique=True) datahub_interaction_id = _col(_uuid(as_uuid=True)) status = _col(_text) __table_args__ = ({'schema': 'public'},)
class Interactions(BaseModel): __tablename__ = 'interactions' id = _col(_int, primary_key=True, autoincrement=True) created_on = _col(_dt) datahub_company_id = _col(_uuid(as_uuid=True)) datahub_interaction_id = _col(_uuid(as_uuid=True)) notes = _col(_text) subject = _col(_text) __table_args__ = ( _unique(datahub_interaction_id), {'schema': 'public'}, )
class InteractionsAnalysedInteractionIdLog(BaseModel): __tablename__ = 'interactions_analysed_interaction_id_log' __table_args__ = {'schema': 'algorithm'} datahub_interaction_id = _col(_uuid(as_uuid=True), primary_key=True) analysed_at = _col(_dt)
class DatahubCompanyExportCountryHistory(BaseModel): __tablename__ = 'datahub_export_country_history' __table_args__ = {'schema': 'public'} class Status(Enum): CURRENTLY_EXPORTING = 'currently_exporting' FUTURE_INTEREST = 'future_interest' id = _col(_int, primary_key=True, autoincrement=True) company_id = _col(_uuid(as_uuid=True)) country = _col(_text) country_iso_alpha2_code = _col(_text) history_date = _col(_dt) history_id = _col(_uuid(as_uuid=True), unique=True) history_type = _col(_text) status = _col(_text)
class DatahubCompany(BaseModel): __tablename__ = 'datahub_company' __table_args__ = {'schema': 'public'} id = _col(_int, primary_key=True, autoincrement=True) company_name = _col(_text) datahub_company_id = _col(_uuid(as_uuid=True), unique=True) companies_house_id = _col(_text) sector = _col(_text) reference_code = _col(_text) postcode = _col(_text) modified_on = _col(_dt)
class InteractionsAnalysed(BaseModel): __tablename__ = 'interactions_analysed' __table_args__ = {'schema': 'algorithm'} id = _col(_int, primary_key=True, autoincrement=True) datahub_interaction_id = _col(_uuid(as_uuid=True)) place = _col(_text, nullable=False) standardized_place = _col(_text) action = _col(_text) type = _col(_text) context = _col(_sa.ARRAY(_text)) negation = _col(_bool)
class ExportWins(BaseModel): __tablename__ = 'export_wins' __table_args__ = {'schema': 'public'} id = _col(_int, primary_key=True, autoincrement=True) export_wins_id = _col(_uuid(as_uuid=True), unique=True) company_name = _col(_text) export_wins_company_id = _col(_text) contact_email_address = _col(_text) created_on = _col(_dt) sector = _col(_text) country = _col(_text) date_won = _col(_date)
class PipelineDataFile(BaseModel): __tablename__ = 'pipeline_data_file' id = _col(_uuid(as_uuid=True), primary_key=True, default=uuid.uuid4) data_file_url = _col(_text, nullable=False) pipeline_id = _col(_int, _foreign_key('pipeline.id'), nullable=False) state = _col(_text) error_message = _col(_text) uploaded_at = _col(_dt, default=lambda: datetime.datetime.utcnow()) started_processing_at = _col(_dt) processed_at = _col(_dt) column_types = _col(_array(_text)) delimiter = _col(_text, nullable=False, server_default=DEFAULT_CSV_DELIMITER) quote = _col(_text, server_default=DEFAULT_CSV_QUOTECHAR) pipeline = _relationship('Pipeline')