Skip to content

Commit

Permalink
model changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed May 27, 2020
1 parent 2bfaeb2 commit 226fac3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
34 changes: 34 additions & 0 deletions app/dashboard/migrations/0114_auto_20200527_0740.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 2.2.4 on 2020-05-27 07:40

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('dashboard', '0113_merge_20200520_1648'),
]

operations = [
migrations.AlterField(
model_name='bountyevent',
name='event_type',
field=models.CharField(choices=[('accept_worker', 'Accept Worker'), ('cancel_bounty', 'Cancel Bounty'), ('submit_work', 'Submit Work'), ('stop_work', 'Stop Work'), ('express_interest', 'Express Interest'), ('payout_bounty', 'Payout Bounty'), ('expire_bounty', 'Expire Bounty'), ('extend_expiration', 'Extend Expiration'), ('close_bounty', 'Close Bounty'), ('worker_paid', 'Worker Paid')], max_length=50),
),
migrations.AlterField(
model_name='bountyfulfillment',
name='fulfiller_address',
field=models.CharField(blank=True, help_text='address to which amount is credited', max_length=50, null=True),
),
migrations.AlterField(
model_name='bountyfulfillment',
name='funder_address',
field=models.CharField(blank=True, help_text='address from which amount is deducted', max_length=50, null=True),
),
migrations.AlterField(
model_name='bountyfulfillment',
name='funder_profile',
field=models.ForeignKey(blank=True, help_text="funder's profile", null=True, on_delete=django.db.models.deletion.CASCADE, to='dashboard.Profile'),
),
]
11 changes: 6 additions & 5 deletions app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,7 @@ class BountyEvent(SuperModel):
('expire_bounty', 'Expire Bounty'),
('extend_expiration', 'Extend Expiration'),
('close_bounty', 'Close Bounty'),
('worker_paid', 'Worker Paid')
)

bounty = models.ForeignKey('dashboard.Bounty', on_delete=models.CASCADE,
Expand Down Expand Up @@ -1355,12 +1356,12 @@ class BountyFulfillment(SuperModel):
# TODO: RETIRE
fulfiller_metadata = JSONField(default=dict, blank=True)

fulfiller_address = models.CharField(max_length=50, help_text="address to which amount is credited")
funder_address = models.CharField(max_length=50, null=True, help_text="address from which amount is deducted")
fulfiller_address = models.CharField(max_length=50, null=True, blank=True, help_text="address to which amount is credited")
funder_address = models.CharField(max_length=50, null=True, blank=True, help_text="address from which amount is deducted")

# TODO: rename to fulfiller_profile
profile = models.ForeignKey('dashboard.Profile', related_name='fulfilled', on_delete=models.CASCADE, null=True, help_text="fulfillers's profile")
funder_profile = models.ForeignKey('dashboard.Profile', null=True, on_delete=models.CASCADE, help_text="funder's profile")
funder_profile = models.ForeignKey('dashboard.Profile', null=True, blank=True, on_delete=models.CASCADE, help_text="funder's profile")


# TODO: rename to hours_worked
Expand All @@ -1372,8 +1373,8 @@ class BountyFulfillment(SuperModel):
accepted = models.BooleanField(default=False, help_text="has the fulfillment been accepted by the funder")
accepted_on = models.DateTimeField(null=True, blank=True, help_text="date when the fulfillment was accepted by the funder")

payout_type = models.CharField(max_length=20, null=True, blank=True,choices=PAYOUT_TYPE, help_text="payment type used to make the payment")
tenant = models.CharField(max_length=10, null=True, blank=True,choices=TENANT, help_text="specific tenant type under the payout_type")
payout_type = models.CharField(max_length=20, null=True, blank=True, choices=PAYOUT_TYPE, help_text="payment type used to make the payment")
tenant = models.CharField(max_length=10, null=True, blank=True, choices=TENANT, help_text="specific tenant type under the payout_type")

funder_identifier = models.CharField(max_length=50, null=True, blank=True, help_text="unique funder identifier used by when payout_type is fiat")
fulfiller_identifier = models.CharField(max_length=50, null=True, blank=True, help_text="unique fulfiller identifier used by when payout_type is fiat")
Expand Down

0 comments on commit 226fac3

Please sign in to comment.