summaryrefslogtreecommitdiff
path: root/app/income/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/income/models.py')
-rw-r--r--app/income/models.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/income/models.py b/app/income/models.py
new file mode 100644
index 0000000..9cace38
--- /dev/null
+++ b/app/income/models.py
@@ -0,0 +1,36 @@
+from django.db import models
+from django.utils import timezone
+
+from resume.models import PubItem, Publisher
+
+
+class Gig(models.Model):
+ title = models.CharField(max_length=200)
+ pitch = models.TextField(null=True, blank=True)
+ created = models.DateTimeField(auto_now_add=True)
+ pub_date = models.DateTimeField(default=timezone.now)
+ STATUS = (
+ (0, "Pitched"),
+ (1, "Accepted"),
+ (2, "Rejected"),
+ (3, "Published"),
+ )
+ status = models.IntegerField(choices=STATUS, default=1)
+ payment = models.DecimalField(max_digits=10, decimal_places=2)
+ PAY_STATUS = (
+ (0, "NOT SUBMITTED"),
+ (1, "Invoiced"),
+ (2, "Paid"),
+ )
+ payment_status = models.IntegerField(choices=PAY_STATUS, default=1)
+ PAY_TYPE = (
+ (0, "Flat Rate"),
+ (1, "Per Word"),
+ (2, "Hourly"),
+ )
+ pay_type = models.IntegerField(choices=PAY_TYPE, default=1)
+ publisher = models.ForeignKey(Publisher, blank=True, null=True)
+ pub_item = models.ForeignKey(PubItem, blank=True, null=True)
+
+ def __str__(self):
+ return self.title