text: # Generated by Django 2.2.10 on 2020-03-10 15:35
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import uuid
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='News',
              fields=[
                  ('uuid_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('content', models.TextField(verbose_name='新闻内容')),
                  ('reply', models.BooleanField(default=False, verbose_name='是否为评论')),
                  ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
                  ('updated_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='更新时间')),
                  ('likers', models.ManyToManyField(blank=True, related_name='liked_news', to=settings.AUTH_USER_MODEL, verbose_name='点赞用户')),
                  ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='news.News', verbose_name='父级自关联')),
                  ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publishes', to=settings.AUTH_USER_MODEL, verbose_name='用户')),
              ],
              options={
                  'verbose_name': '新闻',
                  'verbose_name_plural': '新闻',
                  'ordering': ('-updated_at', '-created_at'),
              },
          ),
      ]
  