mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 17:45:18 +02:00
See #890: added moderation note model, serializers and views
This commit is contained in:
parent
80c8610632
commit
ab3bc96783
13 changed files with 193 additions and 9 deletions
30
api/funkwhale_api/moderation/migrations/0004_note.py
Normal file
30
api/funkwhale_api/moderation/migrations/0004_note.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Generated by Django 2.2.4 on 2019-08-29 09:08
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('federation', '0020_auto_20190730_0846'),
|
||||
('contenttypes', '0002_remove_content_type_name'),
|
||||
('moderation', '0003_report'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Note',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
|
||||
('creation_date', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('summary', models.TextField(max_length=50000)),
|
||||
('target_id', models.IntegerField(null=True)),
|
||||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='moderation_notes', to='federation.Actor')),
|
||||
('target_content_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue