start moking case display sets
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.1.4 on 2025-06-30 12:03
|
||||
|
||||
import django.db.models.deletion
|
||||
import generic.mixins
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0071_casedetail_default_viewerstate'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='CaseDisplaySet',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text='Name of the display set', max_length=255)),
|
||||
('description', models.TextField(blank=True, help_text='Description of the display set')),
|
||||
('viewerstate', models.JSONField(blank=True, help_text='Viewer state for the display set', null=True)),
|
||||
('annotations', models.JSONField(blank=True, help_text='Annotations for the display set', null=True)),
|
||||
('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='atlas.case')),
|
||||
],
|
||||
bases=(models.Model, generic.mixins.AuthorMixin),
|
||||
),
|
||||
]
|
||||
@@ -1102,6 +1102,32 @@ class SeriesDetail(models.Model):
|
||||
class Meta:
|
||||
ordering = ("sort_order",)
|
||||
|
||||
class CaseDisplaySet(models.Model, AuthorMixin):
|
||||
case = models.ForeignKey(Case, on_delete=models.CASCADE)
|
||||
|
||||
name = models.CharField(
|
||||
max_length=255,
|
||||
help_text="Name of the display set",
|
||||
)
|
||||
|
||||
description = models.TextField(
|
||||
blank=True,
|
||||
help_text="Description of the display set",
|
||||
)
|
||||
|
||||
viewerstate = models.JSONField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Viewer state for the display set",
|
||||
)
|
||||
|
||||
annotations = models.JSONField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Annotations for the display set",
|
||||
)
|
||||
|
||||
|
||||
|
||||
class CaseDetail(models.Model):
|
||||
"""A through table that stores the relationship between a case and a collection.
|
||||
|
||||
Reference in New Issue
Block a user