20 lines
435 B
Python
20 lines
435 B
Python
"""
|
|
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
|
|
|