first working version
This commit is contained in:
19
exam_system/exam_server/api/models.py
Normal file
19
exam_system/exam_server/api/models.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Models for user management.
|
||||
"""
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
from django.db import models
|
||||
|
||||
|
||||
class User(AbstractUser):
|
||||
"""Extended user model."""
|
||||
email = models.EmailField(unique=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'users'
|
||||
|
||||
def __str__(self):
|
||||
return self.username
|
||||
|
||||
Reference in New Issue
Block a user