0001_initial.py 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Generated by Django 3.2 on 2021-07-17 20:05
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = [
  7. ('user', '0001_initial'),
  8. ('plan', '0001_initial'),
  9. ('software', '0001_initial'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='TestTask',
  14. fields=[
  15. ('id', models.CharField(default='TestLaboratory_V1_Task_1', max_length=30, primary_key=True, serialize=False, unique=True, verbose_name='测试任务编号')),
  16. ('title', models.CharField(max_length=50, verbose_name='测试任务标题')),
  17. ('state', models.IntegerField(verbose_name='测试任务状态')),
  18. ('description', models.TextField(verbose_name='测试任务描述')),
  19. ('statement_file', models.TextField(verbose_name='说明文档id文件')),
  20. ('case_file', models.TextField(null=True, verbose_name='测试用例文档')),
  21. ('case_all', models.IntegerField(null=True, verbose_name='全部测试用例数量')),
  22. ('case_not_execute', models.IntegerField(null=True, verbose_name='未执行测试用例数量')),
  23. ('case_success', models.IntegerField(null=True, verbose_name='成功测试用例数量')),
  24. ('case_fail', models.IntegerField(null=True, verbose_name='失败测试用例数量')),
  25. ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
  26. ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
  27. ('delete', models.BooleanField(default=False)),
  28. ('executor', models.ManyToManyField(to='user.User', verbose_name='测试任务执行者')),
  29. ('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plan.testplan', verbose_name='测试任务所属计划')),
  30. ],
  31. options={
  32. 'verbose_name': '测试任务',
  33. 'verbose_name_plural': '测试任务',
  34. 'db_table': 'task',
  35. },
  36. ),
  37. migrations.CreateModel(
  38. name='TestCase',
  39. fields=[
  40. ('id', models.CharField(default='TestLaboratory_V1_Case_1', max_length=30, primary_key=True, serialize=False, unique=True, verbose_name='测试用例编号')),
  41. ('id_in_task', models.CharField(default='1', max_length=30, verbose_name='在测试任务中编号')),
  42. ('version', models.CharField(max_length=30, null=True, verbose_name='软件版本')),
  43. ('name', models.CharField(max_length=50, verbose_name='名称')),
  44. ('state', models.IntegerField(verbose_name='状态')),
  45. ('writer', models.CharField(max_length=30, null=True, verbose_name='测试用例编写人')),
  46. ('executor', models.CharField(max_length=30, null=True, verbose_name='测试用例执行人')),
  47. ('assessor', models.CharField(max_length=30, null=True, verbose_name='测试用例评审员')),
  48. ('requisite', models.TextField(null=True, verbose_name='前置条件')),
  49. ('priority', models.CharField(max_length=10, null=True, verbose_name='优先级')),
  50. ('environment', models.TextField(null=True, verbose_name='测试环境')),
  51. ('type', models.CharField(max_length=30, null=True, verbose_name='测试类型')),
  52. ('process', models.TextField(verbose_name='测试步骤')),
  53. ('expected_result', models.TextField(verbose_name='预期结果')),
  54. ('actual_result', models.TextField(null=True, verbose_name='实际结果')),
  55. ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
  56. ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
  57. ('delete', models.BooleanField(default=False)),
  58. ('remark', models.TextField(null=True, verbose_name='备注')),
  59. ('software', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='software.software', verbose_name='测试软件')),
  60. ('task', models.ForeignKey(default='TestLaboratory_V1_Task_1', on_delete=django.db.models.deletion.CASCADE, to='task.testtask', verbose_name='测试用例所在测试任务')),
  61. ],
  62. options={
  63. 'verbose_name': '测试用例',
  64. 'verbose_name_plural': '测试用例',
  65. 'db_table': 'test_case',
  66. },
  67. ),
  68. ]