10 lines
281 B
Python
10 lines
281 B
Python
from django.contrib.auth.models import User
|
|
from django.db import models
|
|
|
|
|
|
class Agent(models.Model):
|
|
name = models.CharField(max_length=255)
|
|
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True)
|
|
|
|
def __str__(self):
|
|
return f"Agent_{self.name}"
|