-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5791 from fecgov/feature/nation-party-endpoints
Add national party schedule a/b endpoints
- Loading branch information
Showing
10 changed files
with
1,112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
from .base import db | ||
from sqlalchemy.dialects.postgresql import TSVECTOR | ||
from webservices import docs | ||
|
||
|
||
class NationalParty_ScheduleA(db.Model): | ||
__table_args__ = {'schema': 'public'} | ||
__tablename__ = 'ofec_sched_a_national_party_mv' | ||
|
||
amendment_indicator = db.Column('action_cd', db.String) | ||
amendment_indicator_desc = db.Column('action_cd_desc', db.String) | ||
back_reference_schedule_name = db.Column('back_ref_sched_nm', db.String) | ||
back_reference_transaction_id = db.Column('back_ref_tran_id', db.String) | ||
candidate_id = db.Column('cand_id', db.String, doc=docs.CANDIDATE_ID) | ||
candidate_middle_name = db.Column('cand_m_nm', db.String) | ||
candidate_name = db.Column('cand_nm', db.String, doc=docs.CANDIDATE_NAME) | ||
candidate_first_name = db.Column('cand_nm_first', db.String) | ||
candidate_last_name = db.Column('cand_nm_last', db.String) | ||
candidate_office = db.Column('cand_office', db.String) | ||
candidate_office_full = db.Column('cand_office_desc', db.String) | ||
candidate_office_district = db.Column('cand_office_district', db.String, doc=docs.DISTRICT) | ||
candidate_office_state = db.Column('cand_office_st', db.String) | ||
candidate_office_state_full = db.Column('cand_office_st_desc', db.String) | ||
candidate_prefix = db.Column('cand_prefix', db.String) | ||
candidate_suffix = db.Column('cand_suffix', db.String) | ||
contributor_committee_name = db.Column('contbr_cmte', db.String) | ||
contributor_committee_designation = db.Column('contbr_cmte_desgn', db.String) | ||
contributor_committee_designation_full = db.Column('contbr_cmte_desgn_full', db.String) | ||
contributor_committee_organization = db.Column('contbr_cmte_org', db.String) | ||
contributor_committee_organization_full = db.Column('contbr_cmte_org_full', db.String) | ||
contributor_committee_party = db.Column('contbr_cmte_party', db.String) | ||
contributor_committee_party_full = db.Column('contbr_cmte_party_full', db.String) | ||
contributor_committee_state = db.Column('contbr_cmte_state', db.String) | ||
contributor_committee_state_full = db.Column('contbr_cmte_state_full', db.String) | ||
contributor_committee_type = db.Column('contbr_cmte_type', db.String, index=True) | ||
contributor_committee_type_full = db.Column('contbr_cmte_type_full', db.String) | ||
committee_designation = db.Column('cmte_dsgn', db.String) | ||
committee_id = db.Column('cmte_id', db.String(9), doc=docs.COMMITTEE_ID) | ||
committee_name = db.Column('cmte_nm', db.String, doc=docs.COMMITTEE_NAME) | ||
recipient_committee_type = db.Column('cmte_tp', db.String, doc=docs.COMMITTEE_TYPE) | ||
recipient_committee_type_full = db.Column('committee_type_full', db.String) | ||
contributor_aggregate_ytd = db.Column('contb_aggregate_ytd', db.Numeric(14, 2)) | ||
contribution_receipt_amount = db.Column('contb_receipt_amt', db.Numeric(14, 2)) | ||
contribution_receipt_date = db.Column('contb_receipt_dt', db.Date) | ||
contributor_city = db.Column('contbr_city', db.String, index=True, doc=docs.CONTRIBUTOR_CITY) | ||
contributor_employer = db.Column('contbr_employer', db.String, index=True, doc=docs.CONTRIBUTOR_EMPLOYER) | ||
contributor_employer_text = db.Column(TSVECTOR) | ||
contributor_id = db.Column('clean_contbr_id', db.String, index=True, doc=docs.CONTRIBUTOR_ID) | ||
contributor_middle_name = db.Column('contbr_m_nm', db.String) | ||
contributor_name = db.Column('contbr_nm', db.String, index=True) | ||
contributor_name_text = db.Column(TSVECTOR) | ||
contributor_first_name = db.Column('contbr_nm_first', db.String) | ||
contributor_last_name = db.Column('contbr_nm_last', db.String) | ||
contributor_occupation = db.Column('contbr_occupation', db.String(38), index=True) | ||
contributor_occupation_text = db.Column(TSVECTOR) | ||
contributor_prefix = db.Column('contbr_prefix', db.String) | ||
contributor_state = db.Column('contbr_st', db.String, index=True, doc=docs.CONTRIBUTOR_STATE) | ||
contributor_street_1 = db.Column('contbr_st1', db.String) | ||
contributor_street_2 = db.Column('contbr_st2', db.String) | ||
contributor_suffix = db.Column('contbr_suffix', db.String) | ||
contributor_zip = db.Column('contbr_zip', db.String, index=True, doc=docs.CONTRIBUTOR_ZIP) | ||
recipient_committee_designation = db.Column('designation', db.String) | ||
recipient_committee_designation_full = db.Column('designation_full', db.String) | ||
donor_committee_name = db.Column('donor_cmte_nm', db.String) | ||
election_type = db.Column('election_tp', db.String) | ||
election_type_desc = db.Column('election_tp_desc', db.String) | ||
entity_type = db.Column('entity_tp', db.String) | ||
entity_type_desc = db.Column('entity_tp_desc', db.String) | ||
fec_election_type_desc = db.Column('fec_election_tp_desc', db.String) | ||
fec_election_year = db.Column('fec_election_yr', db.String) | ||
file_number = db.Column('file_num', db.Numeric) | ||
filing_form = db.Column(db.String) | ||
filing_frequency = db.Column(db.String) | ||
image_number = db.Column('image_num', db.String(18), index=True, doc=docs.IMAGE_NUMBER) | ||
increased_limit = db.Column(db.String) | ||
is_active = db.Column(db.Boolean) | ||
is_individual = db.Column(db.Boolean) | ||
line_num = db.Column(db.String) | ||
line_number_label = db.Column(db.String) | ||
link_id = db.Column(db.String) | ||
memo_cd = db.Column(db.String) | ||
memo_cd_desc = db.Column(db.String) | ||
memo_text = db.Column(db.String) | ||
national_cmte_nonfed_acct = db.Column(db.String) | ||
orig_sub_id = db.Column(db.Numeric) | ||
party = db.Column(db.String) | ||
party_account_type = db.Column('party_account', db.String) | ||
party_full = db.Column(db.String) | ||
pdf_url = db.Column(db.String) | ||
receipt_desc = db.Column('receipt_desc', db.String) | ||
receipt_type = db.Column('receipt_tp', db.String) | ||
receipt_type_desc = db.Column('receipt_tp_desc', db.String) | ||
report_type = db.Column('rpt_tp', db.String) | ||
report_year = db.Column('rpt_yr', db.Numeric, index=True) | ||
schedule_type = db.Column(db.String) | ||
schedule_type_desc = db.Column(db.String) | ||
state = db.Column(db.String) | ||
state_full = db.Column(db.String) | ||
sub_id = db.Column(db.Numeric(19), primary_key=True, index=True) | ||
tran_id = db.Column(db.String) | ||
treasurer_name = db.Column(db.String) | ||
two_year_transaction_period = db.Column(db.Numeric) | ||
|
||
|
||
class NationalParty_ScheduleB(db.Model): | ||
__table_args__ = {'schema': 'public'} | ||
__tablename__ = 'ofec_sched_b_national_party_mv' | ||
|
||
amendment_indicator = db.Column('action_cd', db.String) | ||
amendment_indicator_desc = db.Column('action_cd_desc', db.String) | ||
back_reference_schedule_id = db.Column('back_ref_sched_id', db.String) | ||
back_reference_transaction_id = db.Column('back_ref_tran_id', db.String) | ||
benef_committee_name = db.Column('benef_cmte_nm', db.String) | ||
candidate_id = db.Column('cand_id', db.String, doc=docs.CANDIDATE_ID) | ||
candidate_middle_name = db.Column('cand_m_nm', db.String) | ||
candidate_name = db.Column('cand_nm', db.String, doc=docs.CANDIDATE_NAME) | ||
candidate_first_name = db.Column('cand_nm_first', db.String) | ||
candidate_last_name = db.Column('cand_nm_last', db.String) | ||
candidate_office = db.Column('cand_office', db.String) | ||
candidate_office_full = db.Column('cand_office_desc', db.String) | ||
candidate_office_district = db.Column('cand_office_district', db.String, doc=docs.DISTRICT) | ||
candidate_office_state = db.Column('cand_office_st', db.String) | ||
candidate_office_state_full = db.Column('cand_office_st_desc', db.String) | ||
candidate_prefix = db.Column('cand_prefix', db.String) | ||
candidate_suffix = db.Column('cand_suffix', db.String) | ||
category_code = db.Column('catg_cd', db.String) | ||
category_code_desc = db.Column('catg_cd_desc', db.String) | ||
spender_committee_designation = db.Column('cmte_dsgn', db.String) | ||
committee_id = db.Column('cmte_id', db.String(9), doc=docs.COMMITTEE_ID) | ||
committee_name = db.Column('cmte_nm', db.String, doc=docs.COMMITTEE_NAME) | ||
spender_committee_type = db.Column('cmte_tp', db.String, doc=docs.COMMITTEE_TYPE) | ||
committee_type = db.Column(db.String) | ||
committee_type_full = db.Column(db.String) | ||
disbursement_amount = db.Column('disb_amt', db.Numeric, index=True) | ||
disbursement_description = db.Column('disb_desc', db.String) | ||
disbursement_date = db.Column('disb_dt', db.Date, index=True) | ||
disbursement_type = db.Column('disb_tp', db.String) | ||
disbursement_type_desc = db.Column('disb_tp_desc', db.String) | ||
disbursement_description_text = db.Column(TSVECTOR) | ||
disbursement_purpose_category = db.Column(db.String) | ||
election_type = db.Column('election_tp', db.String) | ||
election_type_desc = db.Column('election_tp_desc', db.String) | ||
entity_type = db.Column('entity_tp', db.String) | ||
entity_type_desc = db.Column('entity_tp_desc', db.String) | ||
fec_election_type_desc = db.Column('fec_election_tp_desc', db.String) | ||
fec_election_type_year = db.Column('fec_election_tp_year', db.String) | ||
file_number = db.Column('file_num', db.Numeric) | ||
filing_form = db.Column(db.String) | ||
filing_frequency = db.Column(db.String) | ||
image_number = db.Column('image_num', db.String(18), index=True, doc=docs.IMAGE_NUMBER) | ||
is_active = db.Column(db.Boolean) | ||
line_number = db.Column('line_num', db.String) | ||
line_number_label = db.Column(db.String) | ||
link_id = db.Column(db.String) | ||
memo_cd = db.Column(db.String) | ||
memo_cd_desc = db.Column(db.String) | ||
memo_text = db.Column(db.String) | ||
national_cmte_nonfed_acct = db.Column('national_cmte_nonfed_acct', db.String) | ||
orig_sub_id = db.Column(db.Numeric) | ||
party = db.Column(db.String) | ||
party_account = db.Column('party_account', db.String) | ||
party_full = db.Column('party_full', db.String) | ||
payee_employer = db.Column('payee_employer', db.String) | ||
payee_first_name = db.Column('payee_f_nm', db.String) | ||
payee_last_name = db.Column('payee_l_nm', db.String) | ||
payee_middle_name = db.Column('payee_m_nm', db.String) | ||
payee_occupation = db.Column('payee_occupation', db.String) | ||
payee_prefix = db.Column(db.String) | ||
payee_suffix = db.Column(db.String) | ||
pdf_url = db.Column(db.String) | ||
recipient_city = db.Column(db.String) | ||
recipient_committee_id = db.Column('recipient_cmte_id', db.String) | ||
recipient_committee_name = db.Column('recipient_cmte', db.String) | ||
recipient_committee_designation = db.Column('recipient_cmte_desgn', db.String) | ||
recipient_committee_designation_full = db.Column('recipient_cmte_desgn_full', db.String) | ||
recipient_committee_org = db.Column('recipient_cmte_org', db.String) | ||
recipient_committee_org_full = db.Column('recipient_cmte_org_full', db.String) | ||
recipient_committee_party = db.Column('recipient_cmte_party', db.String) | ||
recipient_committee_party_full = db.Column('recipient_cmte_party_full', db.String) | ||
recipient_committee_state = db.Column('recipient_cmte_state', db.String) | ||
recipient_committee_state_full = db.Column('recipient_cmte_state_full', db.String) | ||
recipient_committee_type = db.Column('recipient_cmte_type', db.String, index=True) | ||
recipient_committee_type_full = db.Column('recipient_cmte_type_full', db.String) | ||
recipient_name_text = db.Column(TSVECTOR) | ||
recipient_name = db.Column('recipient_nm', db.String) | ||
recipient_state = db.Column('recipient_st', db.String) | ||
recipient_street1 = db.Column('recipient_st1', db.String) | ||
recipient_street2 = db.Column('recipient_st2', db.String) | ||
recipient_zip = db.Column('recipient_zip', db.String) | ||
ref_disp_excess_flg = db.Column('ref_disp_excess_flg', db.String) | ||
report_type = db.Column('rpt_tp', db.String) | ||
report_year = db.Column('rpt_yr', db.Numeric, index=True) | ||
schedule_type = db.Column(db.String) | ||
schedule_type_desc = db.Column(db.String) | ||
semi_an_bundled_refund = db.Column('semi_an_bundled_refund', db.Numeric) | ||
state = db.Column(db.String) | ||
state_full = db.Column(db.String) | ||
sub_id = db.Column(db.Numeric(19), primary_key=True, index=True) | ||
tran_id = db.Column(db.String) | ||
treasurer_name = db.Column(db.String) | ||
two_year_transaction_period = db.Column(db.Numeric) |
Oops, something went wrong.