Add App Contracts

This commit is contained in:
2026-02-19 22:48:53 -05:00
parent a841e4885e
commit 222bf97d0b
30 changed files with 1177 additions and 4 deletions

View File

@@ -0,0 +1,95 @@
# Generated by Django 6.0.1 on 2026-02-18 19:41
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Tags',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=31, unique=True)),
('desc', models.TextField(blank=True, null=True)),
],
),
migrations.CreateModel(
name='Company',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=63)),
('unq_entity_id', models.CharField(blank=True, max_length=63, null=True)),
('website', models.URLField(blank=True, max_length=127, null=True)),
('short_desc', models.CharField(blank=True, max_length=63, null=True)),
('long_desc', models.TextField(blank=True, null=True)),
('gmap_link', models.CharField(blank=True, max_length=253, null=True)),
('address_complete', models.CharField(blank=True, max_length=127, null=True)),
('address_numbers', models.CharField(blank=True, max_length=63, null=True)),
('address_type', models.CharField(blank=True, max_length=31, null=True)),
('city', models.CharField(blank=True, max_length=127, null=True)),
('state', models.CharField(blank=True, max_length=127, null=True)),
('zip_code', models.CharField(blank=True, max_length=15, null=True)),
('tags', models.ManyToManyField(blank=True, to='contracts.tags')),
],
options={
'verbose_name_plural': 'Companies',
'ordering': ['name'],
'unique_together': {('name', 'website')},
},
),
migrations.CreateModel(
name='Contract',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=31, unique=True)),
('notice_id', models.CharField(blank=True, max_length=31, null=True)),
('related_notice_id', models.CharField(blank=True, max_length=31, null=True)),
('opp_type', models.CharField(blank=True, max_length=63, null=True)),
('pub_date', models.DateField(blank=True, null=True)),
('us_dept', models.CharField(blank=True, max_length=31, null=True)),
('us_dept_sub_tier', models.CharField(blank=True, max_length=31, null=True)),
('major_dept', models.CharField(blank=True, max_length=31, null=True)),
('us_office', models.CharField(blank=True, max_length=31, null=True)),
('award_date', models.CharField(blank=True, max_length=31, null=True)),
('award_num', models.CharField(blank=True, max_length=31, null=True)),
('unq_entity_id', models.CharField(blank=True, max_length=31, null=True)),
('awarded_name', models.CharField(blank=True, max_length=31, null=True)),
('awarded_addr', models.CharField(blank=True, max_length=31, null=True)),
('contract_value', models.CharField(blank=True, max_length=31, null=True)),
('orig_set_aside', models.CharField(blank=True, max_length=127, null=True)),
('prod_svc_code', models.CharField(blank=True, max_length=127, null=True)),
('naics_code', models.CharField(blank=True, max_length=127, null=True)),
('contract_url', models.CharField(blank=True, max_length=127, null=True)),
('description', models.TextField(blank=True, null=True)),
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contracts.company')),
],
options={
'verbose_name_plural': 'Contracts',
'ordering': ['pub_date', 'notice_id'],
'unique_together': {('notice_id', 'unq_entity_id')},
},
),
migrations.CreateModel(
name='Exec',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=63)),
('linkedin', models.URLField(blank=True, max_length=127, null=True)),
('short_desc', models.CharField(blank=True, max_length=63, null=True)),
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contracts.company')),
('tags', models.ManyToManyField(blank=True, to='contracts.tags')),
],
options={
'verbose_name_plural': 'Execs',
'ordering': ['name'],
'unique_together': {('name', 'company')},
},
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 6.0.1 on 2026-02-18 19:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='contract',
name='pub_date_txt',
field=models.CharField(blank=True, max_length=63, null=True),
),
migrations.AlterField(
model_name='contract',
name='pub_date',
field=models.DateTimeField(blank=True, null=True),
),
]

View File

@@ -0,0 +1,19 @@
# Generated by Django 6.0.1 on 2026-02-18 20:08
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0002_contract_pub_date_txt_alter_contract_pub_date'),
]
operations = [
migrations.AlterField(
model_name='contract',
name='company',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contracts.company'),
),
]

View File

@@ -0,0 +1,19 @@
# Generated by Django 6.0.1 on 2026-02-18 20:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0003_alter_contract_company'),
]
operations = [
migrations.AlterField(
model_name='contract',
name='notice_id',
field=models.CharField(default='000000000000000', max_length=31),
preserve_default=False,
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-02-18 20:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0004_alter_contract_notice_id'),
]
operations = [
migrations.AlterField(
model_name='contract',
name='title',
field=models.CharField(max_length=31),
),
]

View File

@@ -0,0 +1,30 @@
# Generated by Django 6.0.1 on 2026-02-18 23:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0005_alter_contract_title'),
]
operations = [
migrations.AlterModelOptions(
name='contract',
options={'ordering': ['-pub_date', 'notice_id'], 'verbose_name_plural': 'Contracts'},
),
migrations.RemoveField(
model_name='contract',
name='awarded_addr',
),
migrations.RemoveField(
model_name='contract',
name='awarded_name',
),
migrations.AlterField(
model_name='company',
name='unq_entity_id',
field=models.CharField(blank=True, max_length=63, null=True, unique=True),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-02-18 23:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0006_alter_contract_options_remove_contract_awarded_addr_and_more'),
]
operations = [
migrations.AlterField(
model_name='company',
name='unq_entity_id',
field=models.CharField(max_length=63, unique=True),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-02-18 23:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0007_alter_company_unq_entity_id'),
]
operations = [
migrations.AlterField(
model_name='contract',
name='award_date',
field=models.DateField(blank=True, max_length=31, null=True),
),
]

View File

@@ -0,0 +1,22 @@
# Generated by Django 6.0.1 on 2026-02-18 23:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0008_alter_contract_award_date'),
]
operations = [
migrations.AlterUniqueTogether(
name='contract',
unique_together={('notice_id', 'unq_entity_id', 'pub_date_txt')},
),
migrations.AlterField(
model_name='contract',
name='title',
field=models.CharField(max_length=254),
),
]

View File

@@ -0,0 +1,45 @@
# Generated by Django 6.0.1 on 2026-02-19 02:20
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0009_alter_contract_unique_together_alter_contract_title'),
]
operations = [
migrations.CreateModel(
name='OriginalContract',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('number', models.CharField(max_length=31, unique=True)),
],
),
migrations.CreateModel(
name='Paragraph',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField(blank=True, null=True)),
('link', models.CharField(max_length=255, unique=True)),
('paragraph', models.TextField(blank=True, null=True)),
],
),
migrations.AlterField(
model_name='contract',
name='award_date',
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name='contract',
name='original_contract_number',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contracts.originalcontract'),
),
migrations.AddField(
model_name='originalcontract',
name='para',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contracts.paragraph'),
),
]

View File

@@ -0,0 +1,28 @@
# Generated by Django 6.0.1 on 2026-02-19 02:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0010_originalcontract_paragraph_alter_contract_award_date_and_more'),
]
operations = [
migrations.AlterField(
model_name='paragraph',
name='date',
field=models.DateField(),
),
migrations.AlterField(
model_name='paragraph',
name='link',
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name='paragraph',
name='paragraph',
field=models.TextField(),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-02-19 02:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contracts', '0011_alter_paragraph_date_alter_paragraph_link_and_more'),
]
operations = [
migrations.AlterField(
model_name='originalcontract',
name='number',
field=models.CharField(max_length=63),
),
]

View File

@@ -0,0 +1,17 @@
# Generated by Django 6.0.1 on 2026-02-19 02:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contracts', '0012_alter_originalcontract_number'),
]
operations = [
migrations.AlterUniqueTogether(
name='contract',
unique_together=set(),
),
]

View File

@@ -0,0 +1,17 @@
# Generated by Django 6.0.1 on 2026-02-19 08:50
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contracts', '0013_alter_contract_unique_together'),
]
operations = [
migrations.AlterModelOptions(
name='paragraph',
options={'ordering': ['-date'], 'verbose_name_plural': 'Paragraphs'},
),
]

View File