mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-20 21:39:37 +02:00
15 lines
No EOL
496 B
Python
15 lines
No EOL
496 B
Python
from django.db import models
|
|
from django.contrib.auth import get_user_model
|
|
import uuid
|
|
|
|
User = get_user_model()
|
|
|
|
class ImmichIntegration(models.Model):
|
|
server_url = models.CharField(max_length=255)
|
|
api_key = models.CharField(max_length=255)
|
|
user = models.ForeignKey(
|
|
User, on_delete=models.CASCADE)
|
|
id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
|
|
|
|
def __str__(self):
|
|
return self.user.username + ' - ' + self.server_url |