Commit d01761b5 authored by Meet Narendra's avatar Meet Narendra 💬

removed extra files and added db model

parent 4eb02dd0
__pycache__/
*.pyc
\ No newline at end of file
from unittest.util import _MAX_LENGTH
from django.db import models from django.db import models
import uuid
# Create your models here. # Create your models here.
class Users(models.Model):
uid = models.UUIDField(primary_key=True,default=uuid.uuid4,editable=False)
email = models.CharField(max_length=30)
password = models.CharField(max_length=30)
role = models.CharField(max_length=30)
created_date = models.DateTimeField(auto_now_add=True,blank=True)
active = models.BooleanField(default=False)
class Projects(models.Model):
pid = models.UUIDField(primary_key=True,default=uuid.uuid4,editable=False)
pname = models.CharField(max_length=50)
created_date = models.DateTimeField(auto_now_add=True,blank=True)
powner = models.CharField(max_length=50)
class Access(models.Model):
aid = models.UUIDField(primary_key=True,default=uuid.uuid4,editable=False)
pname = models.CharField(max_length=50)
pid = models.ForeignKey(Projects,on_delete=models.CASCADE)
uid = models.ForeignKey(Users,on_delete=models.CASCADE)
alevel = models.IntegerField(default=0) # 0 = No access 1 = View only 2 = RW 3 = Owner
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment