|
|
32
|
+ (DELETED, '已删除'),
|
|
|
33
|
+ )
|
|
|
34
|
+
|
|
|
35
|
+ admin_id = ShortUUIDField(_('admin_id'), max_length=32, blank=True, null=True, help_text='管理员唯一标识', db_index=True, unique=True)
|
|
|
36
|
+
|
|
|
37
|
+ campus_id = models.CharField(_('campus_id'), max_length=32, blank=True, null=True, help_text='分院唯一标识', db_index=True)
|
|
|
38
|
+ campus_name = models.CharField(_('campus_name'), max_length=255, blank=True, null=True, help_text='分院名称')
|
|
|
39
|
+
|
|
|
40
|
+ name = models.CharField(_('name'), max_length=255, blank=True, null=True, help_text='管理员姓名')
|
|
|
41
|
+ phone = models.CharField(_('phone'), max_length=11, blank=True, null=True, help_text='管理员电话', db_index=True)
|
|
|
42
|
+
|
|
|
43
|
+ user_status = models.IntegerField(_('user_status'), choices=USER_STATUS_TUPLE, default=PENDING, help_text='管理员状态', db_index=True)
|
|
|
44
|
+
|
|
|
45
|
+ class Meta:
|
|
|
46
|
+ verbose_name = _(u'分院管理员信息')
|
|
|
47
|
+ verbose_name_plural = _(u'分院管理员信息')
|
|
|
48
|
+
|
|
|
49
|
+ def __unicode__(self):
|
|
|
50
|
+ return '%d' % self.pk
|
|
|
51
|
+
|
|
|
52
|
+
|
|
|
53
|
+class CourseInfo(BaseModelMixin):
|
|
|
54
|
+ course_id = ShortUUIDField(_('course_id'), max_length=32, blank=True, null=True, help_text='课程唯一标识', db_index=True, unique=True)
|
|
|
55
|
+ course_name = models.CharField(_('course_name'), max_length=255, blank=True, null=True, help_text='课程名称')
|
|
|
56
|
+ # TODO:权限
|
|
|
57
|
+
|
|
|
58
|
+ class Meta:
|
|
|
59
|
+ verbose_name = _('课程信息')
|
|
|
60
|
+ verbose_name_plural = _('课程信息')
|
|
|
61
|
+
|
|
|
62
|
+ def __unicode__(self):
|
|
|
63
|
+ return '%d' % self.pk
|
|
|
64
|
+
|
|
|
65
|
+
|
|
|
66
|
+class CourseRegisterFieldInfo(BaseModelMixin):
|
|
|
67
|
+ field_id = ShortUUIDField(_('field_id'), max_length=32, blank=True, null=True, help_text='字段唯一标识', db_index=True, unique=True)
|
|
|
68
|
+
|
|
|
69
|
+ course_id = models.CharField(_('course_id'), max_length=32, blank=True, null=True, help_text='课程唯一标识', db_index=True)
|
|
|
70
|
+ course_name = models.CharField(_('course_name'), max_length=255, blank=True, null=True, help_text='课程名称')
|
|
|
71
|
+
|
|
|
72
|
+ # {
|
|
|
73
|
+ # "type": "input", # input, select, file
|
|
|
74
|
+ # "name": "",
|
|
|
75
|
+ # "options": ["男", "女"], # type=select
|
|
|
76
|
+ # }
|
|
|
77
|
+ fields = JSONField(_('fields'), default=[], blank=True, null=True, help_text='字段列表')
|
|
|
78
|
+
|
|
|
79
|
+ class Meta:
|
|
|
80
|
+ verbose_name = _('课程报名字段信息')
|
|
|
81
|
+ verbose_name_plural = _('课程报名字段信息')
|
|
|
82
|
+
|
|
|
83
|
+ def __unicode__(self):
|
|
|
84
|
+ return '%d' % self.pk
|
|
|
85
|
+
|
|
|
86
|
+
|
|
|
87
|
+class CourseRegisterInfo(BaseModelMixin):
|
|
|
88
|
+ field_id = models.CharField(_('field_id'), max_length=32, blank=True, null=True, help_text='字段唯一标识', db_index=True)
|
|
|
89
|
+
|
|
|
90
|
+ course_id = models.CharField(_('course_id'), max_length=32, blank=True, null=True, help_text='课程唯一标识', db_index=True)
|
|
|
91
|
+ course_name = models.CharField(_('course_name'), max_length=255, blank=True, null=True, help_text='课程名称')
|
|
|
92
|
+
|
|
|
93
|
+ fields = JSONField(_('fields'), default=[], blank=True, null=True, help_text='字段信息')
|
|
|
94
|
+
|
|
|
95
|
+ class Meta:
|
|
|
96
|
+ verbose_name = _('课程报名信息')
|
|
|
97
|
+ verbose_name_plural = _('课程报名信息')
|
|
|
98
|
+
|
|
|
99
|
+ def __unicode__(self):
|
|
|
100
|
+ return '%d' % self.pk
|
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+from django.test import TestCase
|
|
|
2
|
+
|
|
|
3
|
+# Create your tests here.
|
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+from django.shortcuts import render
|
|
|
2
|
+
|
|
|
3
|
+# Create your views here.
|