models.py 1.02 KB
Newer Older
1 2
from django.db import models

3

Gazdag Péter committed
4
class Disk(models.Model):
5 6 7 8

    """A virtual disk.
    """

9 10 11 12 13 14 15 16 17
    name = models.CharField(
        blank=True, max_length=100, verbose_name="name", help_text="Name of the disk"
    )
    remote_ID = models.CharField(
        max_length=40,
        unique=True,
        verbose_name="remote_ID",
        help_text="ID, which helps access the disk",
    )
Bodor Máté committed
18 19


Bodor Máté committed
20 21
class Image(models.Model):

Bodor Máté committed
22 23
    """A virtual image.
    """
Bodor Máté committed
24

Bodor Máté committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
    name = models.CharField(
        max_length=100,
        verbose_name="name",
        help_text="Human readable name of image."
    )
    description = models.TextField(
        verbose_name="description",
        blank=True,
        help_text="Description of the image."
    )
    remote_ID = models.CharField(
        max_length=40,
        unique=True,
        verbose_name="remote_ID",
        help_text="ID, which helps access the image."
    )
    created_at = models.DateTimeField(
        auto_now_add=True,
        editable=False,
        help_text="Date, when the image created."
    )