# Path: owade/constants.py
# FILE_DIR = EXT_HDRIVE + "/file"
# 
# Path: owade/constants.py
# IMAGE_DIR = EXT_HDRIVE + "/image"


from django.db import models
from owade.constants import FILE_DIR
from owade.constants import IMAGE_DIR

# Create your models here.
##################################################
#### File Extraction
##################################################

## Represents an hard drive in the database

class HardDrive(models.Model):
    ## Serial number of the hard drive
    #serial = models.CharField(max_length=128, unique=True)
    serial = models.TextField(unique=True)
    ## Size in Byte of the hard drive
    size = models.TextField()

    def __unicode__(self):
        return "%s" % (self.serial)
    ## The path to the image of the hard drive, could be deleted
    def image_path(self):
        return "%s/%s" % (IMAGE_DIR, self.serial)
    ## The path to the ddrescue log of the hard drive, could be deleted
    def log_path(self):

# Path: owade/constants.py
# FILE_DIR = EXT_HDRIVE + "/file"
# 
# Path: owade/constants.py
# IMAGE_DIR = EXT_HDRIVE + "/image"


# Path: owade/models.py
from django.db import models
from owade.constants import FILE_DIR
from owade.constants import IMAGE_DIR


# Create your models here.
##################################################
#### File Extraction
##################################################

## Represents an hard drive in the database

class HardDrive(models.Model):
    ## Serial number of the hard drive
    #serial = models.CharField(max_length=128, unique=True)
    serial = models.TextField(unique=True)
    ## Size in Byte of the hard drive
    size = models.TextField()

    def __unicode__(self):
        return "%s" % (self.serial)
    ## The path to the image of the hard drive, could be deleted
    def image_path(self):
        return "%s/%s" % (IMAGE_DIR, self.serial)
    ## The path to the ddrescue log of the hard drive, could be deleted
    def log_path(self):

        return "%s/%s_log_ddrescue" % (IMAGE_DIR, self.serial)