diff --git a/djangoldp/migrations/0002_auto_20180913_1800.py b/djangoldp/migrations/0002_auto_20180913_1800.py new file mode 100644 index 0000000000000000000000000000000000000000..2dc582f64f395dde4073f9fbcd05d3b4bfd7c448 --- /dev/null +++ b/djangoldp/migrations/0002_auto_20180913_1800.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-09-13 18:00 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('djangoldp', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='LDNotification', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('author', models.URLField()), + ('object', models.URLField()), + ('type', models.CharField(max_length=255)), + ('summary', models.TextField()), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AlterModelOptions( + name='ldpsource', + options={'ordering': ('federation',), 'permissions': (('view_source', 'acl:Read'), ('control_source', 'acl:Control'))}, + ), + ] diff --git a/djangoldp/models.py b/djangoldp/models.py index dba287bc10bdc663e52a1a4b936727f7b8e536b1..52fb14db7b6d7270c537a1067d2e492106cf3059 100644 --- a/djangoldp/models.py +++ b/djangoldp/models.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.db import models class LDPSource(models.Model): @@ -14,3 +15,11 @@ class LDPSource(models.Model): def __str__(self): return "{}: {}".format(self.federation, self.container) + + +class LDNotification(models.Model): + user = models.ForeignKey(settings.AUTH_USER_MODEL) + author = models.URLField() + object = models.URLField() + type = models.CharField(max_length=255) + summary = models.TextField()