class CampaignDetail(models.Model): filer_id = models.IntegerField(primary_key=True, default=0, help_text="2384 unique integers identifying each committee.") candidate_name = models.TextField(blank=True, null=True, help_text="Not unique_together (candidate_name, committee_name, race).") committee_name = models.LongCharField(max_length=-1, blank=True, null=True, help_text='Nonunique identifying name.') race = models.TextField(blank=True, null=True) website = models.TextField(blank=True, null=True) phone = models.LongCharField(max_length=-1, blank=True, null=True) total = models.FloatField(blank=True, null=True) total_spent = models.FloatField(blank=True, null=True) grassroots = models.FloatField(blank=True, null=True) instate = models.FloatField(blank=True, null=True) filer_id = models.IntegerField(primary_key=True) election = models.TextField(blank=True, null=True) party = models.TextField(blank=True, null=True) num_transactions = models.BigIntegerField(blank=True, null=True) committee_type = models.LongCharField(max_length=-1, blank=True, null=True) committee_subtype = models.LongCharField(max_length=-1, blank=True, null=True) db_update_status = models.TextField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'campaign_detail'
class WorkingTransactions(models.Model): tran_id = models.IntegerField(blank=True, primary_key=True, null=False) tran_date = models.DateField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) contributor_payee_class = models.LongCharField(max_length=-1, blank=True, null=True) def __str__(self): return representation(self) class Meta: managed = False db_table = 'working_transactions'
class WorkingTransactions(models.Model): tran_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) contributor_payee_class = models.LongCharField(max_length=-1, blank=True, null=True) IMPORTANT_FIELDS = ['tran_id', 'tran_date', 'filer_id', 'filer', 'filed_date', 'amount', 'direction', 'purpose_codes'] def __str__(self): return representation(self) class Meta: app_label = 'pacs' verbose_name = 'working transaction' verbose_name_plural = 'working transactions' managed = False db_table = 'cc_working_transactions'
class WorkingTransactions(models.Model): tran_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) contributor_payee_class = models.LongCharField(max_length=-1, blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'working_transactions'
class WorkingCandidateFilings(models.Model): election_txt = models.TextField(blank=True, null=True) election_year = models.IntegerField(blank=True, null=True) office_group = models.TextField(blank=True, null=True) id_nbr = models.IntegerField(blank=True, null=True) office = models.TextField(blank=True, null=True) candidate_office = models.TextField(blank=True, null=True) candidate_file_rsn = models.IntegerField(blank=True, null=True) file_mthd_ind = models.TextField(blank=True, null=True) filetype_descr = models.TextField(blank=True, null=True) party_descr = models.TextField(blank=True, null=True) major_party_ind = models.TextField(blank=True, null=True) cand_ballot_name_txt = models.TextField(blank=True, null=True) occptn_txt = models.TextField(blank=True, null=True) education_bckgrnd_txt = models.TextField(blank=True, null=True) occptn_bkgrnd_txt = models.TextField(blank=True, null=True) school_grade_diploma_degree_certificate_course_of_study = models.TextField( blank=True, null=True) prev_govt_bkgrnd_txt = models.TextField(blank=True, null=True) judge_incbnt_ind = models.TextField(blank=True, null=True) qlf_ind = models.TextField(blank=True, null=True) filed_date = models.DateField(blank=True, null=True) file_fee_rfnd_date = models.DateField(blank=True, null=True) witdrw_date = models.DateField(blank=True, null=True) withdrw_resn_txt = models.NullBooleanField() pttn_file_date = models.DateField(blank=True, null=True) pttn_sgnr_rqd_nbr = models.IntegerField(blank=True, null=True) pttn_signr_filed_nbr = models.IntegerField(blank=True, null=True) pttn_cmplt_date = models.DateField(blank=True, null=True) ballot_order_nbr = models.IntegerField(blank=True, null=True) prfx_name_cd = models.TextField(blank=True, null=True) first_name = models.TextField(blank=True, null=True) mdle_name = models.TextField(blank=True, null=True) last_name = models.TextField(blank=True, null=True) sufx_name = models.TextField(blank=True, null=True) title_txt = models.TextField(blank=True, null=True) mailing_addr_line_1 = models.TextField(blank=True, null=True) mailing_addr_line_2 = models.TextField(blank=True, null=True) mailing_city_name = models.TextField(blank=True, null=True) mailing_st_cd = models.TextField(blank=True, null=True) mailing_zip_code = models.IntegerField(blank=True, null=True) mailing_zip_plus_four = models.IntegerField(blank=True, null=True) residence_addr_line_1 = models.TextField(blank=True, null=True) residence_addr_line_2 = models.TextField(blank=True, null=True) residence_city_name = models.TextField(blank=True, null=True) residence_st_cd = models.TextField(blank=True, null=True) residence_zip_code = models.IntegerField(blank=True, null=True) residence_zip_plus_four = models.IntegerField(blank=True, null=True) home_phone = models.TextField(blank=True, null=True) cell_phone = models.TextField(blank=True, null=True) fax_phone = models.TextField(blank=True, null=True) email = models.TextField(blank=True, null=True) work_phone = models.TextField(blank=True, null=True) web_address = models.TextField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'working_candidate_filings'
class CcGrassRootsInState(models.Model): filer_id = models.IntegerField(blank=True, primary_key=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) num_transactions = models.BigIntegerField(blank=True, null=True) in_state = models.FloatField(blank=True, null=True) grass_roots = models.FloatField(blank=True, null=True) total_contributions = models.FloatField(blank=True, null=True) total_money = models.FloatField(blank=True, null=True) total_money_out = models.FloatField(blank=True, null=True) percent_grass_roots = models.FloatField(blank=True, null=True) percent_in_state = models.FloatField(blank=True, null=True) IMPORTANT_FIELDS = [ 'filer_id', 'filer', 'total_money', 'percent_grass_roots', 'percent_in_state' ] def __str__(self): return representation(self) class Meta: verbose_name = 'grass roots in-state total' verbose_name_plural = 'grass roots in-state totals' managed = False db_table = 'cc_grass_roots_in_state'
class RawCommitteesScraped(models.Model): name = models.TextField(blank=True, null=True) id = models.IntegerField(blank=True, null=True) acronym = models.TextField(blank=True, null=True) pac_type = models.TextField(blank=True, null=True) filing_effective_from = models.TextField(blank=True, null=True) filing_type = models.TextField(blank=True, null=True) address = models.TextField(blank=True, null=True) campaign_phone = models.TextField(blank=True, null=True) treasurer_name = models.TextField(blank=True, null=True) treasurer_mailing_address = models.TextField(blank=True, null=True) treasurer_work_phone_home_phone_fax = models.TextField(blank=True, null=True) treasurer_email_address = models.TextField(blank=True, null=True) candidate_name = models.TextField(blank=True, null=True) candidate_election_office = models.TextField(blank=True, null=True) candidate_party_affiliation = models.TextField(blank=True, null=True) candidate_candidate_address = models.TextField(blank=True, null=True) candidate_work_phone_home_phone_fax = models.TextField(blank=True, null=True) candidate_mailing_address = models.TextField(blank=True, null=True) candidate_email_address = models.TextField(blank=True, null=True) candidate_occupation = models.TextField(blank=True, null=True) candidate_employer = models.TextField(blank=True, null=True) measure_election = models.TextField(blank=True, null=True) measure_support = models.TextField(blank=True, null=True) measure_details = models.TextField(blank=True, null=True) committee_type = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'raw_committees_scraped'
class RawCommittees(models.Model): committee_id = models.IntegerField(primary_key=True) committee_name = models.CharField(max_length=-1, blank=True, null=True) committee_type = models.CharField(max_length=-1, blank=True, null=True) committee_subtype = models.CharField(max_length=-1, blank=True, null=True) candidate_office = models.CharField(max_length=-1, blank=True, null=True) candidate_office_group = models.CharField(max_length=-1, blank=True, null=True) filing_date = models.DateField(blank=True, null=True) organization_filing_date = models.DateField(db_column='organization_filing Date', blank=True, null=True) # Field name made lowercase. Field renamed to remove unsuitable characters. treasurer_first_name = models.CharField(max_length=-1, blank=True, null=True) treasurer_last_name = models.CharField(max_length=-1, blank=True, null=True) treasurer_mailing_address = models.CharField(max_length=-1, blank=True, null=True) treasurer_work_phone = models.CharField(max_length=-1, blank=True, null=True) treasurer_fax = models.CharField(max_length=-1, blank=True, null=True) candidate_first_name = models.CharField(max_length=-1, blank=True, null=True) candidate_last_name = models.CharField(max_length=-1, blank=True, null=True) candidate_work_phone = models.CharField(max_length=-1, blank=True, null=True) candidate_residence_phone = models.CharField(max_length=-1, blank=True, null=True) candidate_fax = models.CharField(max_length=-1, blank=True, null=True) candidate_email = models.CharField(max_length=-1, blank=True, null=True) active_election = models.CharField(max_length=-1, blank=True, null=True) measure = models.CharField(max_length=-1, blank=True, null=True) maling_address = models.CharField(max_length=-1, blank=True, null=True) class Meta: managed = False db_table = 'raw_committees'
class RawCommittees(models.Model): """Committee details""" committee_id = models.IntegerField(primary_key=True, default=0, blank=True, null=False) committee_name = models.LongCharField(max_length=-1, blank=True, null=True) committee_type = models.LongCharField(max_length=-1, blank=True, null=True) committee_subtype = models.LongCharField(max_length=-1, blank=True, null=True) candidate_office = models.LongCharField(max_length=-1, blank=True, null=True) candidate_office_group = models.LongCharField(max_length=-1, blank=True, null=True) filing_date = models.DateField(blank=True, null=True) organization_filing_date = models.DateField(db_column='organization_filing Date', blank=True, null=True) treasurer_first_name = models.LongCharField(max_length=-1, blank=True, null=True) treasurer_last_name = models.LongCharField(max_length=-1, blank=True, null=True) treasurer_mailing_address = models.LongCharField(max_length=-1, blank=True, null=True) treasurer_work_phone = models.LongCharField(max_length=-1, blank=True, null=True) treasurer_fax = models.LongCharField(max_length=-1, blank=True, null=True) candidate_first_name = models.LongCharField(max_length=-1, blank=True, null=True) candidate_last_name = models.LongCharField(max_length=-1, blank=True, null=True) candidate_mailing_address = models.LongCharField(db_column='maling_address', max_length=-1, blank=True, null=True) candidate_work_phone = models.LongCharField(max_length=-1, blank=True, null=True) candidate_residence_phone = models.LongCharField(max_length=-1, blank=True, null=True) candidate_fax = models.LongCharField(max_length=-1, blank=True, null=True) candidate_email = models.LongCharField(max_length=-1, blank=True, null=True) active_election = models.LongCharField(max_length=-1, blank=True, null=True) measure = models.LongCharField(max_length=-1, blank=True, null=True) IMPORTANT_FIELDS = ['committee_id', 'committee_name', 'committee_type', 'candidate_office', 'filing_date', 'candidate_first_name', 'candidate_last_name', 'measure'] def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = True db_table = 'raw_committees'
class CampaignDetail(models.Model): filer_id = models.IntegerField(primary_key=True, default=0) candidate_name = models.TextField(blank=True, null=True) committee_name = models.LongCharField(max_length=-1, blank=True, null=True) race = models.TextField(blank=True, null=True) website = models.TextField(blank=True, null=True) phone = models.LongCharField(max_length=-1, blank=True, null=True) total = models.FloatField(blank=True, null=True) total_spent = models.FloatField(blank=True, null=True) grassroots = models.FloatField(blank=True, null=True) instate = models.FloatField(blank=True, null=True) election = models.TextField(blank=True, null=True) party = models.TextField(blank=True, null=True) num_transactions = models.BigIntegerField(blank=True, null=True) committee_type = models.LongCharField(max_length=-1, blank=True, null=True) committee_subtype = models.LongCharField(max_length=-1, blank=True, null=True) db_update_status = models.TextField(blank=True, null=True) IMPORTANT_FIELDS = ['filer_id', 'committee_name', 'committee_type', 'committee_subtype', 'candidate_name', 'website', 'party', 'race'] def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = True db_table = 'campaign_detail'
class WorkingCommittees(models.Model): committee_id = models.IntegerField(blank=True, null=True) committee_name = models.LongCharField(max_length=-1, blank=True, null=True) committee_type = models.LongCharField(max_length=-1, blank=True, null=True) committee_subtype = models.LongCharField(max_length=-1, blank=True, null=True) party_affiliation = models.TextField(blank=True, null=True) phone = models.LongCharField(max_length=-1, blank=True, null=True) election_office = models.TextField(blank=True, null=True) candidate_name = models.TextField(blank=True, null=True) candidate_email_address = models.LongCharField(max_length=-1, blank=True, null=True) candidate_work_phone_home_phone_fax = models.TextField(blank=True, null=True) candidate_address = models.LongCharField(max_length=-1, blank=True, null=True) treasurer_name = models.TextField(blank=True, null=True) treasurer_work_phone_home_phone_fax = models.TextField(blank=True, null=True) treasurer_mailing_address = models.LongCharField(max_length=-1, blank=True, null=True) web_address = models.TextField(blank=True, null=True) measure = models.LongCharField(max_length=-1, blank=True, null=True) simple_election = models.TextField(blank=True, null=True) db_update_status = models.TextField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'working_committees'
class AccessLog(models.Model): committee_id = models.IntegerField(blank=True, null=True) date = models.DateTimeField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'access_log'
class OregonCommitteeAgg(models.Model): contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) sum = models.FloatField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'oregon_committee_agg'
class CandidateSumByDate(models.Model): filer_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) total_in = models.FloatField(blank=True, null=True) total_out = models.FloatField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'candidate_sum_by_date'
class CandidateByState(models.Model): candidate_name = models.TextField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) value = models.FloatField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'candidate_by_state'
class AccessLog(models.Model): committee_id = models.IntegerField(blank=True, null=True) date = models.DateTimeField(blank=True, null=True) def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = False db_table = 'access_log'
class WorkingCandidateCommittees(models.Model): candidate_name = models.TextField(blank=True, null=True) committee_id = models.IntegerField(blank=True, null=True) committee_name = models.CharField(max_length=-1, blank=True, null=True) election_office = models.TextField(blank=True, null=True) phone = models.TextField(blank=True, null=True) party_affiliation = models.TextField(blank=True, null=True) web_address = models.TextField(blank=True, null=True) class Meta: managed = False db_table = 'working_candidate_committees'
class OregonCommitteeAgg(models.Model): contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) sum = models.FloatField(blank=True, null=True) def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = False db_table = 'oregon_committee_agg'
class CommitteeTransactions(models.Model): """Committee transactions cleaned with Grimm's migration Intended for use in aggregates displayed to the user. Other transaction tables are dirty (contain transaction ammendments with the same "original_id"). """ tran_id = models.IntegerField(blank=True, primary_key=True, default=0) original_id = models.IntegerField(blank=True) tran_date = models.DateField(blank=True, null=True) tran_status = models.LongCharField(max_length=-1, blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) aggregate_amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) attest_by_name = models.LongCharField(max_length=-1) attest_date = models.DateField() review_by_name = models.LongCharField(max_length=-1, blank=True, null=True) review_date = models.DateField(blank=True, null=True) due_date = models.DateField(blank=True, null=True) occptn_ltr_date = models.LongCharField(max_length=-1, blank=True, null=True) pymt_sched_txt = models.LongCharField(max_length=-1, blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) intrst_rate = models.LongCharField(max_length=-1, blank=True, null=True) check_nbr = models.LongCharField(max_length=-1, blank=True, null=True) tran_stsfd_ind = models.NullBooleanField() filed_by_name = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_book_agent_name = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) title_txt = models.LongCharField(max_length=-1, blank=True, null=True) occptn_txt = models.LongCharField(max_length=-1, blank=True, null=True) emp_name = models.LongCharField(max_length=-1, blank=True, null=True) emp_city = models.LongCharField(max_length=-1, blank=True, null=True) emp_state = models.LongCharField(max_length=-1, blank=True, null=True) employ_ind = models.NullBooleanField() self_employ_ind = models.NullBooleanField() addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) zip_plus_four = models.IntegerField(blank=True, null=True) county = models.LongCharField(max_length=-1, blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) exp_date = models.LongCharField(max_length=-1, blank=True, null=True) IMPORTANT_FIELDS = ['tran_id', 'tran_date', 'filer_id', 'filer', 'contributor_payee', 'amount', 'direction', 'purpose_codes'] def __str__(self): return representation(self) class Meta: app_label = 'pacs' verbose_name = 'transaction' verbose_name_plural = 'transactions' managed = True
class RawCommitteeTransactionsAmmendedTransactions(models.Model): #TODO: what does 'amended' mean? Any reason to keep this table? tran_id = models.IntegerField(blank=True, primary_key=True) original_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) tran_status = models.LongCharField(max_length=-1, blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) aggregate_amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) attest_by_name = models.LongCharField(max_length=-1, blank=True, null=True) attest_date = models.DateField(blank=True, null=True) review_by_name = models.LongCharField(max_length=-1, blank=True, null=True) review_date = models.DateField(blank=True, null=True) due_date = models.DateField(blank=True, null=True) occptn_ltr_date = models.LongCharField(max_length=-1, blank=True, null=True) pymt_sched_txt = models.LongCharField(max_length=-1, blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) intrst_rate = models.LongCharField(max_length=-1, blank=True, null=True) check_nbr = models.LongCharField(max_length=-1, blank=True, null=True) tran_stsfd_ind = models.NullBooleanField() filed_by_name = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_book_agent_name = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) title_txt = models.LongCharField(max_length=-1, blank=True, null=True) occptn_txt = models.LongCharField(max_length=-1, blank=True, null=True) emp_name = models.LongCharField(max_length=-1, blank=True, null=True) emp_city = models.LongCharField(max_length=-1, blank=True, null=True) emp_state = models.LongCharField(max_length=-1, blank=True, null=True) employ_ind = models.NullBooleanField() self_employ_ind = models.NullBooleanField() addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) zip_plus_four = models.IntegerField(blank=True, null=True) county = models.LongCharField(max_length=-1, blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) exp_date = models.LongCharField(max_length=-1, blank=True, null=True) def __str__(self): return representation(self) class Meta: app_label = 'pacs' verbose_name = 'ammended transaction' verbose_name_plural = 'ammended transactions' managed = False db_table = 'raw_committee_transactions_ammended_transactions'
class CandidateSumByDate(models.Model): filer_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) total_in = models.FloatField(blank=True, null=True) total_out = models.FloatField(blank=True, null=True) def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = False db_table = 'candidate_sum_by_date'
class WorkingTransactions(models.Model): # id = models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True) tran_id = models.IntegerField(primary_key=True, verbose_name='transaction ID', blank=False, null=False, default=0, help_text="1.0 fraction unique") tran_date = models.DateField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.ForeignKey( CampaignDetail, db_column='filer_id', blank=True, null=True, help_text="filer_id 17222 is not present in table working_committees") purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) contributor_payee_class = models.LongCharField(max_length=-1, blank=True, null=True) class Meta: managed = True db_table = 'working_transactions'
class WorkingCandidateCommittees(models.Model): # id = models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True) candidate_name = models.TextField(blank=True, null=True) committee_id = models.IntegerField(primary_key=True, default=0) committee_name = models.LongCharField(max_length=-1, blank=True, null=True) election_office = models.TextField(blank=True, null=True) phone = models.TextField(blank=True, null=True) party_affiliation = models.TextField(blank=True, null=True) web_address = models.TextField(blank=True, null=True) class Meta: managed = True db_table = 'working_candidate_committees'
class CandidateByState(models.Model): candidate_name = models.TextField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) value = models.FloatField(blank=True, null=True) def __str__(self): return representation(self) class Meta: app_label = 'pacs' managed = False db_table = 'candidate_by_state'
class CandidateSumByDate(models.Model): filer_id = models.IntegerField(blank=True, primary_key=True) tran_date = models.DateField(blank=True, null=True) total_in = models.FloatField(blank=True, null=True) total_out = models.FloatField(blank=True, null=True) IMPORTANT_FIELDS = ['filer_id', 'total_in', 'total_out'] def __str__(self): return representation(self) class Meta: verbose_name_plural = 'candidate sums by date' managed = False db_table = 'candidate_sum_by_date'
class CcWorkingTransactions(models.Model): id = models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True) tran_id = models.IntegerField( blank=True, null=True, help_text="Should be unique ID but isnt, e.g. 1171373 is duplicated.") tran_date = models.DateField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) direction = models.CharField(max_length=7, blank=True, null=True) contributor_payee_class = models.LongCharField(max_length=-1, blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'cc_working_transactions'
class RawCommitteeTransactions(models.Model): """Comittee transactions scrapped directly from OR-Star without any cleaning/deduping.""" tran_id = models.IntegerField(primary_key=True, default=0, null=False) original_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) tran_status = models.LongCharField(max_length=-1, blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) aggregate_amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) attest_by_name = models.LongCharField(max_length=-1, blank=True, null=True) attest_date = models.DateField(blank=True, null=True) review_by_name = models.LongCharField(max_length=-1, blank=True, null=True) review_date = models.DateField(blank=True, null=True) due_date = models.DateField(blank=True, null=True) occptn_ltr_date = models.LongCharField(max_length=-1, blank=True, null=True) pymt_sched_txt = models.LongCharField(max_length=-1, blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) intrst_rate = models.LongCharField(max_length=-1, blank=True, null=True) check_nbr = models.LongCharField(max_length=-1, blank=True, null=True) tran_stsfd_ind = models.NullBooleanField() filed_by_name = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_book_agent_name = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) title_txt = models.LongCharField(max_length=-1, blank=True, null=True) occptn_txt = models.LongCharField(max_length=-1, blank=True, null=True) emp_name = models.LongCharField(max_length=-1, blank=True, null=True) emp_city = models.LongCharField(max_length=-1, blank=True, null=True) emp_state = models.LongCharField(max_length=-1, blank=True, null=True) employ_ind = models.NullBooleanField() self_employ_ind = models.NullBooleanField() addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) zip_plus_four = models.IntegerField(blank=True, null=True) county = models.LongCharField(max_length=-1, blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) exp_date = models.LongCharField(max_length=-1, blank=True, null=True) IMPORTANT_FIELDS = ['tran_id', 'tran_date', 'filer_id', 'filer', 'contributor_payee', 'amount', 'direction', 'purpose_codes'] def __str__(self): return representation(self) class Meta: app_label = 'pacs' verbose_name = 'raw transaction' verbose_name_plural = 'raw transactions' db_table = 'raw_committee_transactions'
class CcGrassRootsInState(models.Model): filer_id = models.IntegerField(blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) num_transactions = models.BigIntegerField(blank=True, null=True) in_state = models.FloatField(blank=True, null=True) grass_roots = models.FloatField(blank=True, null=True) total_contributions = models.FloatField(blank=True, null=True) total_money = models.FloatField(blank=True, null=True) total_money_out = models.FloatField(blank=True, null=True) percent_grass_roots = models.FloatField(blank=True, null=True) percent_in_state = models.FloatField(blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'cc_grass_roots_in_state'
class RawCommitteeTransactionsErrors(models.Model): tran_id = models.IntegerField(blank=True, null=True) original_id = models.IntegerField(blank=True, null=True) tran_date = models.DateField(blank=True, null=True) tran_status = models.LongCharField(max_length=-1, blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) aggregate_amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True) attest_by_name = models.LongCharField(max_length=-1, blank=True, null=True) attest_date = models.DateField(blank=True, null=True) review_by_name = models.LongCharField(max_length=-1, blank=True, null=True) review_date = models.DateField(blank=True, null=True) due_date = models.DateField(blank=True, null=True) occptn_ltr_date = models.LongCharField(max_length=-1, blank=True, null=True) pymt_sched_txt = models.LongCharField(max_length=-1, blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) intrst_rate = models.LongCharField(max_length=-1, blank=True, null=True) check_nbr = models.LongCharField(max_length=-1, blank=True, null=True) tran_stsfd_ind = models.NullBooleanField() filed_by_name = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_book_agent_name = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) title_txt = models.LongCharField(max_length=-1, blank=True, null=True) occptn_txt = models.LongCharField(max_length=-1, blank=True, null=True) emp_name = models.LongCharField(max_length=-1, blank=True, null=True) emp_city = models.LongCharField(max_length=-1, blank=True, null=True) emp_state = models.LongCharField(max_length=-1, blank=True, null=True) employ_ind = models.NullBooleanField() self_employ_ind = models.NullBooleanField() addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) zip_plus_four = models.IntegerField(blank=True, null=True) county = models.LongCharField(max_length=-1, blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) exp_date = models.LongCharField(max_length=-1, blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'raw_committee_transactions_errors'
class RawCommitteeTransactions(models.Model): tran_id = models.IntegerField(blank=True, null=True, help_text='A single transaction can have multiple tran_ids due to revisions/corrections.') original_id = models.IntegerField(blank=True, null=True, help_text='Nonunique because amendments/corrections must refer to the same original_id.') tran_date = models.DateField(blank=True, null=True) tran_status = models.LongCharField(max_length=-1, blank=True, null=True) filer = models.LongCharField(max_length=-1, blank=True, null=True) contributor_payee = models.LongCharField(max_length=-1, blank=True, null=True) sub_type = models.LongCharField(max_length=-1, blank=True, null=True) amount = models.FloatField(blank=True, null=True) aggregate_amount = models.FloatField(blank=True, null=True) contributor_payee_committee_id = models.IntegerField(blank=True, null=True) filer_id = models.IntegerField(blank=True, null=True, help_text="Unique identifier of a Committee (CommitteeDetail FK)") attest_by_name = models.LongCharField(max_length=-1, blank=True, null=True) attest_date = models.DateField(blank=True, null=True) review_by_name = models.LongCharField(max_length=-1, blank=True, null=True) review_date = models.DateField(blank=True, null=True) due_date = models.DateField(blank=True, null=True) occptn_ltr_date = models.LongCharField(max_length=-1, blank=True, null=True) pymt_sched_txt = models.LongCharField(max_length=-1, blank=True, null=True) purp_desc = models.LongCharField(max_length=-1, blank=True, null=True) intrst_rate = models.LongCharField(max_length=-1, blank=True, null=True) check_nbr = models.LongCharField(max_length=-1, blank=True, null=True) tran_stsfd_ind = models.NullBooleanField() filed_by_name = models.LongCharField(max_length=-1, blank=True, null=True) filed_date = models.DateField(blank=True, null=True) addr_book_agent_name = models.LongCharField(max_length=-1, blank=True, null=True) book_type = models.LongCharField(max_length=-1, blank=True, null=True) title_txt = models.LongCharField(max_length=-1, blank=True, null=True) occptn_txt = models.LongCharField(max_length=-1, blank=True, null=True) emp_name = models.LongCharField(max_length=-1, blank=True, null=True) emp_city = models.LongCharField(max_length=-1, blank=True, null=True) emp_state = models.LongCharField(max_length=-1, blank=True, null=True) employ_ind = models.NullBooleanField() self_employ_ind = models.NullBooleanField() addr_line1 = models.LongCharField(max_length=-1, blank=True, null=True) addr_line2 = models.LongCharField(max_length=-1, blank=True, null=True) city = models.LongCharField(max_length=-1, blank=True, null=True) state = models.LongCharField(max_length=-1, blank=True, null=True) zip = models.IntegerField(blank=True, null=True) zip_plus_four = models.IntegerField(blank=True, null=True) county = models.LongCharField(max_length=-1, blank=True, null=True) purpose_codes = models.LongCharField(max_length=-1, blank=True, null=True) exp_date = models.LongCharField(max_length=-1, blank=True, null=True) class Meta: managed = True app_label = 'pacs' db_table = 'raw_committee_transactions'