uncloud-mravi/nicohack202002/uncloud/opennebula/models.py

11 lines
361 B
Python

import uuid
from django.db import models
from django.contrib.auth import get_user_model
class VM(models.Model):
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
vmid = models.IntegerField()
owner = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
data = models.CharField(max_length=65536, null=True)