예제 #1
0
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'
예제 #2
0
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'
예제 #3
0
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
예제 #4
0
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'
예제 #5
0
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'
예제 #6
0
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'
예제 #7
0
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'
예제 #8
0
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'
예제 #9
0
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'
예제 #10
0
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'
예제 #11
0
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'
예제 #12
0
class ImportDates(models.Model):
    file_id = models.DecimalField(max_digits=256, decimal_places=256, blank=True, null=True)
    scrape_date = models.DateField(blank=True, null=True)
    file_name = models.TextField(blank=True, null=True)

    class Meta:
        managed = True
        app_label = 'pacs'
        db_table = 'import_dates'
예제 #13
0
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'
예제 #14
0
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'
예제 #15
0
class ImportDates(models.Model):
    file_hash = models.DecimalField(primary_key=True, db_column='id', default=0,
                                    max_digits=1000, decimal_places=1000, blank=True, null=False)
    scrape_date = models.DateField(blank=True, null=True)
    file_name = models.TextField(blank=True, null=True)

    def __str__(self):
        return representation(self)

    class Meta:
        app_label = 'pacs'
        managed = True
        db_table = 'import_dates'
예제 #16
0
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'
예제 #17
0
class StateSumByDate(models.Model):
    tran_date = models.DateField(blank=True, null=True)
    total_in = models.FloatField(blank=True, null=True)
    total_out = models.FloatField(blank=True, null=True)
    total_from_within = models.FloatField(blank=True, null=True)
    total_to_within = models.FloatField(blank=True, null=True)
    total_from_the_outside = models.FloatField(blank=True, null=True)
    total_to_the_outside = models.FloatField(blank=True, null=True)
    total_grass_roots = models.FloatField(blank=True, null=True)
    total_from_in_state = models.FloatField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'state_sum_by_date'
예제 #18
0
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'
예제 #19
0
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'
예제 #20
0
class ImportDates(models.Model):
    id = models.DecimalField(max_digits=65535,
                             decimal_places=65535,
                             blank=True,
                             primary_key=True)
    scrape_date = models.DateField(blank=True, null=True)
    file_name = models.TextField(blank=True, null=True)

    def __str__(self):
        return representation(self)

    class Meta:
        verbose_name = 'file import date'
        verbose_name_plural = 'file import dates'
        managed = False
        db_table = 'import_dates'
예제 #21
0
class StateSumByDate(models.Model):
    tran_date = models.DateField(blank=True, null=True)
    total_in = models.FloatField(blank=True, null=True)
    total_out = models.FloatField(blank=True, null=True)
    total_from_within = models.FloatField(blank=True, null=True)
    total_to_within = models.FloatField(blank=True, null=True)
    total_from_the_outside = models.FloatField(blank=True, null=True)
    total_to_the_outside = models.FloatField(blank=True, null=True)
    total_grass_roots = models.FloatField(blank=True, null=True)
    total_from_in_state = models.FloatField(blank=True, null=True)

    def __str__(self):
        return representation(self)

    class Meta:
        app_label = 'pacs'
        managed = False
        db_table = 'state_sum_by_date'
예제 #22
0
class HackOregonDbStatus(models.Model):
    ac_grass_roots_in_state = models.FloatField(blank=True, null=True)
    campaign_detail = models.FloatField(blank=True, null=True)
    candidate_by_state = models.FloatField(blank=True, null=True)
    candidate_sum_by_date = models.FloatField(blank=True, null=True)
    cc_grass_roots_in_state = models.FloatField(blank=True, null=True)
    cc_working_transactions = models.FloatField(blank=True, null=True)
    direction_codes = models.FloatField(blank=True, null=True)
    raw_candidate_filings = models.FloatField(blank=True, null=True)
    raw_committees = models.FloatField(blank=True, null=True)
    raw_committees_scraped = models.FloatField(blank=True, null=True)
    raw_committee_transactions = models.FloatField(blank=True, null=True)
    raw_committee_transactions_ammended_transactions = models.FloatField(
        blank=True, null=True)
    state_translation = models.FloatField(blank=True, null=True)
    working_candidate_committees = models.FloatField(blank=True, null=True)
    working_candidate_filings = models.FloatField(blank=True, null=True)
    working_committees = models.FloatField(blank=True, null=True)
    working_transactions = models.FloatField(blank=True, null=True)
    date = models.DateField(blank=True, null=True)
    event_at_log_time = models.TextField(blank=True, null=True)
    hack_oregon_db_status = models.FloatField(blank=True, null=True)
    all_oregon_sum = models.FloatField(blank=True, null=True)
    state_sum_by_date = models.FloatField(blank=True, null=True)
    documentation = models.FloatField(blank=True, null=True)
    oregon_by_contributions = models.FloatField(blank=True, null=True)
    oregon_by_purpose_codes = models.FloatField(blank=True, null=True)
    sub_type_from_contributor_payee = models.FloatField(blank=True, null=True)
    oregon_committee_agg = models.FloatField(blank=True, null=True)
    import_dates = models.FloatField(blank=True, null=True)
    raw_committee_transactions_errors = models.FloatField(blank=True,
                                                          null=True)
    access_log = models.FloatField(blank=True, null=True)
    search_log = models.FloatField(blank=True, null=True)

    def __str__(self):
        return representation(self)

    class Meta:
        verbose_name = 'database status'
        verbose_name_plural = 'database status'
        managed = False
        db_table = 'hack_oregon_db_status'
예제 #23
0
class RawCandidateFilings(models.Model):
    candidate_file_rsn = models.IntegerField(blank=True, primary_key=True, default=0)
    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)

    IMPORTANT_FIELDS = ['filer_id', 'filer', 'party_descr', 'major_party_ind',
                        'first_name', 'mdle_name', 'last_name', 'sufx_name']

    def __str__(self):
        return representation(self)

    class Meta:
        verbose_name = 'candidate filing'
        app_label = 'pacs'
        managed = True
        db_table = 'raw_candidate_filings'
예제 #24
0
class RawCommittees(models.Model):
    committee_id = models.IntegerField(blank=True,
                                       primary_key=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_maling_address = models.LongCharField(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)

    def __str__(self):
        return representation(self)

    class Meta:
        verbose_name = 'committee'
        verbose_name_plural = 'committees'
        managed = False
        db_table = 'raw_committees'