hackens-orga/hackens_orga/agent/models.py
2023-03-08 01:51:32 +01:00

13 lines
344 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.SET_NULL, blank=True, null=True)
def __repr__(self):
return f"Agent_{self.name}"
def __str__(self):
return self.name