Skip to content
Snippets Groups Projects
Commit ace31df0 authored by Brody Wilton's avatar Brody Wilton Committed by Brody Wilton
Browse files

Add models for User, UserType, Logs, Feedback and bills

parent c330d2f5
Branches
No related tags found
3 merge requests!12dashboard waiting for user logic final and data for tables. changed index....,!11dashboard waiting for user logic final and data for tables. changed index....,!6Brodybranch
from django.db import models
# Usertypes
# ---------
# 0 - Basic User
# 1 - Admin
# 2 - ML Engineer
# 3 - Accountant
# Create your models here.
class User(models.Model):
"""
* User model
"""
username = models.CharField(max_length=150)
password = models.CharField(max_length=16)
email = models.EmailField(max_length=200)
usertype = models.ForeignKey("UserType")
class UserType(models.Model):
"""
* Usertype model
"""
usertype = models.CharField(max_length=15)
class Logs(models.Model):
"""
* Logs model
"""
user_id = models.ForeignKey("User")
content = models.CharField(max_length=2000)
date = models.DateTimeField()
class Feedback(models.Model):
"""
* Feedback Model
"""
user_id = models.ForeignKey("User")
user_id = models.IntegerField()
content = models.CharField(max_length=2000)
class Bills(models.Model):
"""
* Bill/receipts Model
"""
user_id = models.ForeignKey("User")
date = models.DateTimeField()
paid = models.BooleanField(default=False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment