-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
84 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
from django.db import models | ||
from metronus_app.model.company import Company | ||
|
||
|
||
class Department(models.Model): | ||
company_id = models.ForeignKey(Company) | ||
name = models.CharField(max_length=50) | ||
registryDate = models.DateTimeField(auto_now=True) | ||
active=models.BooleanField(default=True) | ||
def __unicode__(self): | ||
return self.name | ||
|
||
class Meta: | ||
unique_together = ('name', 'company_id') | ||
company_id = models.ForeignKey(Company) | ||
name = models.CharField(max_length=50) | ||
registryDate = models.DateTimeField(auto_now=True) | ||
active = models.BooleanField(default=True) | ||
|
||
def __unicode__(self): | ||
return self.name | ||
|
||
class Meta: | ||
unique_together = ('name', 'company_id') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from metronus_app.model.actor import Actor | ||
from django.db import models | ||
|
||
|
||
class Employee(Actor): | ||
price_per_hour=models.FloatField(default=1.0) | ||
price_per_hour = models.FloatField(default=1.0) | ||
|
||
def __unicode__(self): | ||
return self.identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from django.db import models | ||
from metronus_app.model.employee import Employee | ||
|
||
|
||
class EmployeeLog(models.Model): | ||
employee_id = models.ForeignKey(Employee) | ||
event = models.CharField(max_length=1, choices=[('A', 'Alta'), ('B', 'Baja'), ('C', 'Change')], default='A') | ||
event_date = models.DateTimeField(auto_now=True) | ||
price_per_hour=models.FloatField(default=1.0) | ||
price_per_hour = models.FloatField(default=1.0) | ||
|
||
def __unicode__(self): | ||
return self.employee_id + "-" + self.event + "-" + self.event_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
from django.db import models | ||
from metronus_app.model.actor import Actor | ||
from metronus_app.model.task import Task | ||
from metronus_app.model.projectDepartment import ProjectDepartment | ||
|
||
|
||
class GoalEvolution(models.Model): | ||
""" | ||
Each time the goal or the price per unit/hour from a task is changed, a new entry is created in the log | ||
Maybe should have been named TaskLog, but... | ||
""" | ||
task_id = models.ForeignKey(Task) | ||
task_id = models.ForeignKey(Task) | ||
|
||
registryDate = models.DateTimeField(auto_now=True) | ||
|
||
actor_id = models.ForeignKey(Actor) | ||
|
||
production_goal=models.FloatField(blank=True,null=True) | ||
goal_description=models.CharField(blank=True,max_length=100,default="") | ||
production_goal = models.FloatField(blank=True, null=True) | ||
goal_description = models.CharField(blank=True, max_length=100, default="") | ||
|
||
price_per_unit=models.FloatField(null=True,blank=True) | ||
price_per_hour=models.FloatField(null=True,blank=True) | ||
price_per_unit = models.FloatField(null=True, blank=True) | ||
price_per_hour = models.FloatField(null=True, blank=True) | ||
|
||
def __unicode__(self): | ||
return self.production_goal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.