18 lines
537 B
Python
18 lines
537 B
Python
from django.db import models
|
|
|
|
|
|
class LogSource(models.Model):
|
|
name = models.CharField(max_length=128)
|
|
slug = models.CharField(max_length=128, unique=True)
|
|
hidden = models.BooleanField(default=False)
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|
|
|
|
class LogEntry(models.Model):
|
|
source = models.ForeignKey(LogSource, on_delete=models.CASCADE)
|
|
hidden = models.BooleanField(default=False)
|
|
created = models.DateTimeField()
|
|
nick = models.CharField(max_length=128)
|
|
content = models.CharField(max_length=2048)
|