mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Also add a Draft object-to-dictionary conversion method. The following commits will provide an API around this model using which our clients can sync drafts across each other (if they so wish too). As of making this commit, we haven't finalized exactly how our clients will use this. See https://chat.zulip.org/#narrow/stream/2-general/topic/drafts For some of the discussion around this model and in general, around this feature. Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
27 lines
984 B
Python
27 lines
984 B
Python
# Generated by Django 2.2.14 on 2020-07-23 17:07
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('zerver', '0296_remove_userprofile_short_name'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Draft',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('topic', models.CharField(db_index=True, max_length=60)),
|
|
('content', models.TextField()),
|
|
('last_edit_time', models.DateTimeField(db_index=True)),
|
|
('recipient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='zerver.Recipient')),
|
|
('user_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|