Improve outreach compose, contact merge, and email assets.
Add a Quill email editor with DB-backed image storage, selectable PCM designs, postcard defaults for addressed contacts, and merge-by-phone/address on the contact form.
This commit is contained in:
@@ -113,3 +113,31 @@ class ProviderEvent(TimeStampedModel):
|
||||
provider = models.CharField(max_length=64)
|
||||
event_type = models.CharField(max_length=64)
|
||||
payload = models.JSONField(default=dict, blank=True)
|
||||
|
||||
|
||||
class StoredFile(UUIDPrimaryKeyModel, TimeStampedModel):
|
||||
"""Binary file blob in the database (no filesystem media storage)."""
|
||||
|
||||
class Kind(models.TextChoices):
|
||||
CAMPAIGN_IMAGE = "campaign_image", "Campaign image"
|
||||
|
||||
kind = models.CharField(
|
||||
max_length=32, choices=Kind.choices, default=Kind.CAMPAIGN_IMAGE
|
||||
)
|
||||
filename = models.CharField(max_length=255, blank=True)
|
||||
content_type = models.CharField(max_length=128)
|
||||
size = models.PositiveIntegerField(default=0)
|
||||
data = models.BinaryField()
|
||||
uploaded_by = models.ForeignKey(
|
||||
settings.AUTH_USER_MODEL,
|
||||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.SET_NULL,
|
||||
related_name="uploaded_files",
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ["-created_at"]
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.filename or str(self.pk)
|
||||
|
||||
Reference in New Issue
Block a user