Untitled
unknown
plain_text
a year ago
1.8 kB
10
Indexable
from sqlalchemy import MetaData, Table, Column, Integer, String, Boolean
from config.settings import engine
metadata = MetaData()
# Define the table 'mdm_field_details'
field_details = Table('mdm_field_details', metadata,
Column('id', Integer, primary_key=True),
Column('label', String),
Column('name', String),
Column('type', String),
Column('order', Integer),
Column('options', String),
Column('format', String),
Column('is_active', Boolean),
Column('is_deleted', Boolean),
autoload_with=engine
)
# Define the table 'mdm_product'
products = Table('mdm_product', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('status_id', Integer),
Column('therapeutic_area_id', Integer),
Column('country_id', Integer),
Column('is_active', Boolean),
Column('is_deleted', Boolean),
autoload_with=engine
)
# Define relationships for status, therapeutic areas, and countries
status = Table('mdm_status', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('description', String),
autoload_with=engine
)
therapeutic_area = Table('mdm_therapeutic', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('description', String),
autoload_with=engine
)
countries = Table('mdm_countries', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('formal_name', String),
Column('iso2_country_code', String),
Column('iso3_country_code', String),
autoload_with=engine
)
regions = Table('mdm_regions', metadata,
Column('id', Integer, primary_key=True),
Column('name', String),
Column('code', String),
autoload_with=engine
)
Editor is loading...
Leave a Comment