digitaleagenturnc/recoverdir/models.py

18 lines
574 B
Python

from django.db import models
from django.contrib.auth.models import User
from users.models import Agency
from django.utils import timezone
from django_cryptography.fields import encrypt
# HISTORY
from simple_history.models import HistoricalRecords
# Create your models here.
class PersLetter(models.Model):
agency = models.ForeignKey(Agency, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.SET_NULL, blank=True, null=True)
text = encrypt(models.CharField(max_length=100000, blank=True, default="", null=True))
history = HistoricalRecords()