0001_initial.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Generated by Django 4.1 on 2023-08-04 16:13
  2. from django.db import migrations, models
  3. class Migration(migrations.Migration):
  4. initial = True
  5. dependencies = [
  6. ]
  7. operations = [
  8. migrations.CreateModel(
  9. name='DiseaseType',
  10. fields=[
  11. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  12. ('name', models.CharField(max_length=100, verbose_name='传染病类型')),
  13. ],
  14. ),
  15. migrations.CreateModel(
  16. name='Policy',
  17. fields=[
  18. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  19. ('category', models.CharField(max_length=100, verbose_name='政策类别')),
  20. ('file_name', models.CharField(max_length=100, verbose_name='政策文件名')),
  21. ('file_path', models.FileField(upload_to='policy_files/', verbose_name='政策文件路径')),
  22. ('number', models.CharField(max_length=100, verbose_name='文号')),
  23. ('country', models.CharField(max_length=100, verbose_name='所属国家')),
  24. ('department', models.CharField(max_length=100, verbose_name='发布部门')),
  25. ('year', models.IntegerField(verbose_name='发布年份')),
  26. ('publish_date', models.DateField(verbose_name='发布日期')),
  27. ('implementation_date', models.DateField(verbose_name='实施日期')),
  28. ('keywords', models.CharField(max_length=100, verbose_name='关键词')),
  29. ('timeliness', models.CharField(max_length=100, verbose_name='时效性')),
  30. ('effectiveness_level', models.CharField(max_length=100, verbose_name='效力级别')),
  31. ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='创建日期')),
  32. ('updated_date', models.DateTimeField(auto_now=True, verbose_name='更新日期')),
  33. ('status', models.CharField(max_length=100, verbose_name='状态')),
  34. ('disease_types', models.ManyToManyField(to='policies.diseasetype', verbose_name='传染病类型列表')),
  35. ],
  36. ),
  37. ]