class Ypw(db.Model, AutoSerialize): __tablename__ = 'secex_ypw' year = db.Column(db.Integer(4), primary_key=True) hs_id = db.Column(db.String(6), db.ForeignKey(Hs.id), primary_key=True) wld_id = db.Column(db.String(5), db.ForeignKey(Wld.id), primary_key=True) val_usd = db.Column(db.Numeric(16, 2)) val_usd_growth_pct = db.Column(db.Float()) val_usd_growth_pct_5 = db.Column(db.Float()) val_usd_growth_val = db.Column(db.Numeric(16, 2)) val_usd_growth_val_5 = db.Column(db.Numeric(16, 2)) def __repr__(self): return '<Ypw %d.%s.%s>' % (self.year, self.hs_id, self.wld_id)
class BaseSecex(db.Model, AutoSerialize): __abstract__ = True year = db.Column(db.Integer(4), primary_key=True) month = db.Column(db.Integer(2), primary_key=True) import_val = db.Column(db.Numeric(16, 2)) export_val = db.Column(db.Numeric(16, 2)) import_kg = db.Column(db.Integer(11)) export_kg = db.Column(db.Integer(11)) import_val_growth = db.Column(db.Float()) import_val_growth_5 = db.Column(db.Float()) export_val_growth = db.Column(db.Float()) export_val_growth_5 = db.Column(db.Float())
class BaseRais(object): year = db.Column(db.Integer(4), primary_key=True) wage = db.Column(db.Numeric(16, 2)) num_emp = db.Column(db.Integer(11)) num_jobs = db.Column(db.Integer(11)) num_est = db.Column(db.Integer(11)) wage_avg = db.Column(db.Numeric(16, 2)) age_avg = db.Column(db.Numeric(16, 2)) wage_growth = db.Column(db.Float()) wage_growth_5 = db.Column(db.Float()) num_emp_growth = db.Column(db.Float()) num_emp_growth_5 = db.Column(db.Float())
class Yb_secex(db.Model, AutoSerialize): __tablename__ = 'secex_yb' year = db.Column(db.Integer(4), primary_key=True) bra_id = db.Column(db.String(8), db.ForeignKey(Bra.id), primary_key=True) val_usd = db.Column(db.Numeric(16, 2)) eci = db.Column(db.Float()) hs_diversity = db.Column(db.Integer(11)) hs_diversity_eff = db.Column(db.Float()) wld_diversity = db.Column(db.Integer(11)) wld_diversity_eff = db.Column(db.Float()) val_usd_growth_pct = db.Column(db.Float()) val_usd_growth_pct_5 = db.Column(db.Float()) val_usd_growth_val = db.Column(db.Numeric(16, 2)) val_usd_growth_val_5 = db.Column(db.Numeric(16, 2)) def __repr__(self): return '<Yb_secex %d.%s>' % (self.year, self.bra_id)
class Yp(db.Model, AutoSerialize): __tablename__ = 'secex_yp' year = db.Column(db.Integer(4), primary_key=True) hs_id = db.Column(db.String(6), db.ForeignKey(Hs.id), primary_key=True) val_usd = db.Column(db.Numeric(16, 2)) pci = db.Column(db.Float()) bra_diversity = db.Column(db.Integer(11)) bra_diversity_eff = db.Column(db.Float()) wld_diversity = db.Column(db.Integer(11)) wld_diversity_eff = db.Column(db.Float()) rca_wld = db.Column(db.Float()) val_usd_growth_pct = db.Column(db.Float()) val_usd_growth_pct_5 = db.Column(db.Float()) val_usd_growth_val = db.Column(db.Numeric(16, 2)) val_usd_growth_val_5 = db.Column(db.Numeric(16, 2)) def __repr__(self): return '<Yp %d.%s>' % (self.year, self.hs_id)
class Ybp(db.Model, AutoSerialize): __tablename__ = 'secex_ybp' year = db.Column(db.Integer(4), primary_key=True) bra_id = db.Column(db.String(8), db.ForeignKey(Bra.id), primary_key=True) hs_id = db.Column(db.String(6), db.ForeignKey(Hs.id), primary_key=True) val_usd = db.Column(db.Numeric(16, 2)) rca = db.Column(db.Float()) rca_wld = db.Column(db.Float()) distance = db.Column(db.Float()) distance_wld = db.Column(db.Float()) opp_gain = db.Column(db.Float()) opp_gain_wld = db.Column(db.Float()) val_usd_growth_pct = db.Column(db.Float()) val_usd_growth_pct_5 = db.Column(db.Float()) val_usd_growth_val = db.Column(db.Numeric(16, 2)) val_usd_growth_val_5 = db.Column(db.Numeric(16, 2)) def __repr__(self): return '<Ybp %d.%s.%s>' % (self.year, self.bra_id, self.hs_id)