# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from datetime import datetime

# Create your models here.

device_categories = (
    ('p', 'Personal'),
    ('e', 'Electronic'),
    ('h', 'House')
)


class Users(models.Model):
    username = models.CharField(max_length=50)
    email = models.CharField(max_length=75)
    password = models.CharField(max_length=80)

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories, default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device


012d0ce133c15ca260fb78339e3fe1bae0c51011
<mask token>


class Users(models.Model):
    <mask token>
    <mask token>
    <mask token>

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories,
        default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device

<mask token>


class Users(models.Model):
    username = models.CharField(max_length=50)
    email = models.CharField(max_length=75)
    password = models.CharField(max_length=80)

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories,
        default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device

<mask token>
device_categories = ('p', 'Personal'), ('e', 'Electronic'), ('h', 'House')


class Users(models.Model):
    username = models.CharField(max_length=50)
    email = models.CharField(max_length=75)
    password = models.CharField(max_length=80)

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories,
        default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device

from __future__ import unicode_literals
from django.db import models
from datetime import datetime
device_categories = ('p', 'Personal'), ('e', 'Electronic'), ('h', 'House')


class Users(models.Model):
    username = models.CharField(max_length=50)
    email = models.CharField(max_length=75)
    password = models.CharField(max_length=80)

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories,
        default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from datetime import datetime

# Create your models here.

device_categories = (
    ('p', 'Personal'),
    ('e', 'Electronic'),
    ('h', 'House')
)


class Users(models.Model):
    username = models.CharField(max_length=50)
    email = models.CharField(max_length=75)
    password = models.CharField(max_length=80)

    def __unicode__(self):
        return self.username


class Devices(models.Model):
    name = models.CharField(max_length=50)
    power = models.FloatField(default=10)
    category = models.CharField(max_length=1, choices=device_categories, default='p')

    def __unicode__(self):
        return self.name


class Tasks(models.Model):
    device = models.ForeignKey(Devices)
    start_time = models.DateTimeField(default=datetime.now)
    duration = models.FloatField(default=15)
    energy = models.FloatField(default=0.5)

    def __unicode__(self):
        return self.device

