feat: added ltipiitool model (#32790)

* feat: added ltipiitool model

* feat: added ltipiitool model

* feat: created ltipiitool model

* chore: squashed ltipiitool mirgation files for agreements app.

* chore: fixed migration files
This commit is contained in:
Erica Nwoga
2023-08-01 11:39:25 -04:00
committed by GitHub
parent b97007e182
commit 0bde216d6f
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# Generated by Django 3.2.20 on 2023-08-01 14:06
from django.db import migrations, models
import opaque_keys.edx.django.models
class Migration(migrations.Migration):
dependencies = [
('agreements', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LTIPIITool',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('course_key', opaque_keys.edx.django.models.CourseKeyField(db_index=True, max_length=255, unique=True)),
('lti_tools', models.JSONField()),
('lti_tools_hash', models.IntegerField()),
],
),
]

View File

@@ -22,3 +22,15 @@ class IntegritySignature(TimeStampedModel):
class Meta:
app_label = 'agreements'
unique_together = ('user', 'course_key')
class LTIPIITool(models.Model):
"""
This model stores the relationship between a course and the LTI tools in the course that share PII.
"""
course_key = CourseKeyField(max_length=255, unique=True, db_index=True)
lti_tools = models.JSONField()
lti_tools_hash = models.IntegerField()
class Meta:
app_label = 'agreements'