Add the Work, Manage, Price, and Shift models
This commit is contained in:
parent
3774f2ceb1
commit
94a8955891
|
@ -16,3 +16,27 @@ class Provider(models.Model):
|
||||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||||
sin = models.CharField(max_length=16, blank=True)
|
sin = models.CharField(max_length=16, blank=True)
|
||||||
|
|
||||||
|
class Work(models.Model):
|
||||||
|
client = models.ForeignKey(Client, on_delete=models.CASCADE)
|
||||||
|
color = models.CharField(max_length=16, blank=True)
|
||||||
|
label = models.CharField(max_length=100, blank=True)
|
||||||
|
|
||||||
|
class Manage(models.Model):
|
||||||
|
client = models.ForeignKey(Client, on_delete=models.CASCADE)
|
||||||
|
provider = models.ForeignKey(Provider, on_delete=models.CASCADE)
|
||||||
|
note = models.CharField(max_length=500, blank=True)
|
||||||
|
|
||||||
|
class Price(models.Model):
|
||||||
|
client = models.ForeignKey(Client, on_delete=models.CASCADE)
|
||||||
|
provider = models.ForeignKey(Provider, on_delete=models.CASCADE)
|
||||||
|
work = models.ForeignKey(Work, on_delete=models.CASCADE)
|
||||||
|
amount = models.DecimalField(max_digits=8, decimal_places=2)
|
||||||
|
|
||||||
|
class Shift(models.Model):
|
||||||
|
client = models.ForeignKey(Client, on_delete=models.CASCADE)
|
||||||
|
provider = models.ForeignKey(Provider, on_delete=models.CASCADE)
|
||||||
|
work = models.ForeignKey(Work, on_delete=models.CASCADE)
|
||||||
|
set_start = models.DateTimeField()
|
||||||
|
set_end = models.DateTimeField()
|
||||||
|
amount = models.DecimalField(max_digits=8, decimal_places=2)
|
||||||
|
description = models.CharField(max_length=100, blank=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user