aboutsummaryrefslogtreecommitdiff
path: root/carer/mtwerk
diff options
context:
space:
mode:
authorstuppie2026-11-04 12:11:03 -0600
committerstuppie2026-11-04 12:11:03 -0600
commit671a7b1b02503cfa5c9aecd40c27a0c2729a285b (patch)
tree6cb1bd7c33e3e1d243ee5ae74decc57faaa5742d /carer/mtwerk
parente99ec6b7e38113a2237dc1ff402d8f4337c651d5 (diff)
downloadamt-jb-671a7b1b02503cfa5c9aecd40c27a0c2729a285b.tar.gz
amt-jb-671a7b1b02503cfa5c9aecd40c27a0c2729a285b.zip
strip out AMT
Diffstat (limited to 'carer/mtwerk')
-rw-r--r--carer/mtwerk/__init__.py0
-rw-r--r--carer/mtwerk/migrations/0001_initial.py157
-rw-r--r--carer/mtwerk/migrations/__init__.py0
-rw-r--r--carer/mtwerk/models.py130
4 files changed, 0 insertions, 287 deletions
diff --git a/carer/mtwerk/__init__.py b/carer/mtwerk/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/carer/mtwerk/__init__.py
+++ /dev/null
diff --git a/carer/mtwerk/migrations/0001_initial.py b/carer/mtwerk/migrations/0001_initial.py
deleted file mode 100644
index d5c856a..0000000
--- a/carer/mtwerk/migrations/0001_initial.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Generated by Django 5.2.7 on 2025-10-28 22:06
-
-import django.db.models.deletion
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ]
-
- operations = [
- migrations.CreateModel(
- name='Hit',
- fields=[
- ('id', models.BigAutoField(primary_key=True, serialize=False)),
- ('amt_hit_id', models.CharField(max_length=30, unique=True)),
- ('amt_group_id', models.CharField(max_length=30)),
- ('status', models.SmallIntegerField()),
- ('review_status', models.SmallIntegerField()),
- ('creation_time', models.DateTimeField()),
- ('expiration', models.DateTimeField()),
- ('created_at', models.DateTimeField(auto_now_add=True)),
- ('modified_at', models.DateTimeField(auto_now=True)),
- ('max_assignments', models.IntegerField(default=1)),
- ('assignment_pending_count', models.IntegerField(default=0)),
- ('assignment_available_count', models.IntegerField(default=0)),
- ('assignment_completed_count', models.IntegerField(default=0)),
- ],
- options={
- 'db_table': 'mtwerk_hit',
- },
- ),
- migrations.CreateModel(
- name='Assignment',
- fields=[
- ('id', models.BigAutoField(primary_key=True, serialize=False)),
- ('amt_assignment_id', models.CharField(max_length=30, unique=True)),
- ('amt_worker_id', models.CharField(max_length=30)),
- ('status', models.SmallIntegerField()),
- ('auto_approval_time', models.DateTimeField(null=True)),
- ('accept_time', models.DateTimeField(null=True)),
- ('submit_time', models.DateTimeField(null=True)),
- ('approval_time', models.DateTimeField(null=True)),
- ('rejection_time', models.DateTimeField(null=True)),
- ('requester_feedback', models.CharField(max_length=1024, null=True)),
- ('created_at', models.DateTimeField(auto_now_add=True)),
- ('modified_at', models.DateTimeField(auto_now=True)),
- ('tsid', models.UUIDField(null=True)),
- ('hit', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='mtwerk.hit')),
- ],
- options={
- 'db_table': 'mtwerk_assignment',
- },
- ),
- migrations.CreateModel(
- name='HitType',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('amt_hit_type_id', models.CharField(max_length=30, unique=True)),
- ('title', models.CharField(max_length=200)),
- ('description', models.CharField(max_length=2000)),
- ('reward', models.DecimalField(decimal_places=2, max_digits=8)),
- ('assignment_duration', models.PositiveIntegerField()),
- ('auto_approval_delay', models.PositiveIntegerField()),
- ('keywords', models.CharField(max_length=256)),
- ('min_active', models.IntegerField(default=0)),
- ],
- options={
- 'db_table': 'mtwerk_hittype',
- 'indexes': [models.Index(fields=['amt_hit_type_id'], name='mtwerk_hitt_amt_hit_05dd10_idx'), models.Index(fields=['min_active'], name='mtwerk_hitt_min_act_e18222_idx')],
- },
- ),
- migrations.AddField(
- model_name='hit',
- name='hit_type',
- field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='mtwerk.hittype'),
- ),
- migrations.CreateModel(
- name='Question',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('url', models.URLField()),
- ('height', models.IntegerField(default=1200)),
- ],
- options={
- 'db_table': 'mtwerk_question',
- 'unique_together': {('url', 'height')},
- },
- ),
- migrations.AddField(
- model_name='hit',
- name='question',
- field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='mtwerk.question'),
- ),
- migrations.CreateModel(
- name='Bonus',
- fields=[
- ('id', models.BigAutoField(primary_key=True, serialize=False)),
- ('payout_event_id', models.UUIDField(unique=True)),
- ('amt_worker_id', models.CharField(max_length=30, null=True)),
- ('amount', models.DecimalField(decimal_places=2, max_digits=10)),
- ('grant_time', models.DateTimeField()),
- ('reason', models.CharField(max_length=1024)),
- ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='mtwerk.assignment')),
- ],
- options={
- 'indexes': [models.Index(fields=['amt_worker_id'], name='mtwerk_bonu_amt_wor_77d514_idx'), models.Index(fields=['grant_time'], name='mtwerk_bonu_grant_t_d43c6c_idx')],
- },
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['amt_worker_id'], name='mtwerk_assi_amt_wor_7dbe42_idx'),
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['status'], name='mtwerk_assi_status_4e01de_idx'),
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['submit_time'], name='mtwerk_assi_submit__429d3e_idx'),
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['created_at'], name='mtwerk_assi_created_9292fa_idx'),
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['modified_at'], name='mtwerk_assi_modifie_44f1d0_idx'),
- ),
- migrations.AddIndex(
- model_name='assignment',
- index=models.Index(fields=['tsid'], name='mtwerk_assi_tsid_bd796d_idx'),
- ),
- migrations.AddIndex(
- model_name='hit',
- index=models.Index(fields=['status'], name='mtwerk_hit_status_ae726f_idx'),
- ),
- migrations.AddIndex(
- model_name='hit',
- index=models.Index(fields=['review_status'], name='mtwerk_hit_review__a9f420_idx'),
- ),
- migrations.AddIndex(
- model_name='hit',
- index=models.Index(fields=['creation_time'], name='mtwerk_hit_creatio_48e0fd_idx'),
- ),
- migrations.AddIndex(
- model_name='hit',
- index=models.Index(fields=['created_at'], name='mtwerk_hit_created_f1614b_idx'),
- ),
- migrations.AddIndex(
- model_name='hit',
- index=models.Index(fields=['modified_at'], name='mtwerk_hit_modifie_45c2ed_idx'),
- ),
- ]
diff --git a/carer/mtwerk/migrations/__init__.py b/carer/mtwerk/migrations/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/carer/mtwerk/migrations/__init__.py
+++ /dev/null
diff --git a/carer/mtwerk/models.py b/carer/mtwerk/models.py
deleted file mode 100644
index 5cb026d..0000000
--- a/carer/mtwerk/models.py
+++ /dev/null
@@ -1,130 +0,0 @@
-from django.db import models
-
-
-class Question(models.Model):
- """The iFrame location and details for a HIT"""
-
- id = models.AutoField(primary_key=True)
-
- url = models.URLField(max_length=200)
- height = models.IntegerField(default=1200)
-
- class Meta:
- db_table = "mtwerk_question"
- unique_together = ["url", "height"]
-
-
-class HitType(models.Model):
- id = models.AutoField(primary_key=True)
- amt_hit_type_id = models.CharField(max_length=30, unique=True)
-
- title = models.CharField(max_length=200)
- description = models.CharField(max_length=2000)
- reward = models.DecimalField(decimal_places=2, max_digits=8)
- assignment_duration = models.PositiveIntegerField()
- auto_approval_delay = models.PositiveIntegerField()
- keywords = models.CharField(max_length=256)
-
- # If set, don't let the active HIT count drop below this amount
- min_active = models.IntegerField(null=False, default=0)
-
- class Meta:
- db_table = "mtwerk_hittype"
- indexes = [
- models.Index(fields=["amt_hit_type_id"]),
- models.Index(fields=["min_active"]),
- ]
-
-
-class Hit(models.Model):
- id = models.BigAutoField(primary_key=True)
- amt_hit_id = models.CharField(max_length=30, unique=True)
-
- hit_type = models.ForeignKey(HitType, on_delete=models.PROTECT)
-
- amt_group_id = models.CharField(max_length=30)
-
- status = models.SmallIntegerField(null=False)
- review_status = models.SmallIntegerField(null=False)
- creation_time = models.DateTimeField(null=False)
- expiration = models.DateTimeField(null=False)
-
- question = models.ForeignKey(Question, on_delete=models.PROTECT)
- created_at = models.DateTimeField(null=False, auto_now_add=True)
- modified_at = models.DateTimeField(null=False, auto_now=True)
-
- max_assignments = models.IntegerField(null=False, default=1)
- assignment_pending_count = models.IntegerField(null=False, default=0)
- assignment_available_count = models.IntegerField(null=False, default=0)
- assignment_completed_count = models.IntegerField(null=False, default=0)
-
- class Meta:
- db_table = "mtwerk_hit"
- indexes = [
- models.Index(fields=["status"]),
- models.Index(fields=["review_status"]),
- models.Index(fields=["creation_time"]),
- models.Index(fields=["created_at"]),
- models.Index(fields=["modified_at"]),
- ]
-
-
-class Assignment(models.Model):
- id = models.BigAutoField(primary_key=True)
- amt_assignment_id = models.CharField(max_length=30, unique=True)
-
- amt_worker_id = models.CharField(max_length=30, null=False)
-
- hit = models.ForeignKey(Hit, on_delete=models.PROTECT)
-
- status = models.SmallIntegerField(null=False)
-
- auto_approval_time = models.DateTimeField(null=True)
- accept_time = models.DateTimeField(null=True)
- submit_time = models.DateTimeField(null=True)
- approval_time = models.DateTimeField(null=True)
- rejection_time = models.DateTimeField(null=True)
-
- # Don't need this
- # answer = models.CharField
-
- requester_feedback = models.CharField(null=True, max_length=1024)
-
- # Internal tracking
- created_at = models.DateTimeField(null=False, auto_now_add=True)
- modified_at = models.DateTimeField(null=False, auto_now=True)
- tsid = models.UUIDField(null=True)
-
- class Meta:
- db_table = "mtwerk_assignment"
- indexes = [
- models.Index(fields=["amt_worker_id"]),
- models.Index(fields=["status"]),
- models.Index(fields=["submit_time"]),
- models.Index(fields=["created_at"]),
- models.Index(fields=["modified_at"]),
- models.Index(fields=["tsid"]),
- ]
-
-
-class Bonus(models.Model):
- """Issued bonuses to workers for supplemental payments"""
-
- id = models.BigAutoField(primary_key=True)
- payout_event_id = models.UUIDField(null=False, unique=True)
-
- amt_worker_id = models.CharField(max_length=30, null=True)
-
- # Not unique=True because maybe multiple Bonuses will be associated
- # with a single Assignment
- assignment = models.ForeignKey(Assignment, null=False, on_delete=models.PROTECT)
-
- amount = models.DecimalField(max_digits=10, decimal_places=2)
- grant_time = models.DateTimeField(null=False)
- reason = models.CharField(max_length=1024)
-
- class Meta:
- indexes = [
- models.Index(fields=["amt_worker_id"]),
- models.Index(fields=["grant_time"]),
- ]