69adc1d41c
Add Chat User Interface Restructure some services Virtual Scrolling Manual change detection for message updates Enhanced Date pipe Message layout Tabbed reusable chat window Deleting messages Further permission checks Delete-prompts Mobile friendly chat usage automatically scroll to bottom
74 lines
2.3 KiB
Python
74 lines
2.3 KiB
Python
# Generated by Django 2.2.15 on 2020-12-03 12:52
|
|
|
|
from django.db import migrations, models
|
|
|
|
import openslides.utils.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("users", "0015_user_vote_delegated_to"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="ChatGroup",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("name", models.CharField(max_length=256)),
|
|
(
|
|
"access_groups",
|
|
models.ManyToManyField(
|
|
blank=True, related_name="chat_access_groups", to="users.Group"
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"permissions": (("can_manage", "Can manage chat"),),
|
|
"default_permissions": (),
|
|
},
|
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name="ChatMessage",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("text", models.CharField(max_length=512)),
|
|
("timestamp", models.DateTimeField(auto_now_add=True)),
|
|
("username", models.CharField(max_length=256)),
|
|
("user_id", models.IntegerField()),
|
|
(
|
|
"chatgroup",
|
|
models.ForeignKey(
|
|
on_delete=openslides.utils.models.CASCADE_AND_AUTOUPDATE,
|
|
related_name="messages",
|
|
to="chat.ChatGroup",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"default_permissions": (),
|
|
},
|
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
|
),
|
|
]
|