Exemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('courses', '0005_auto_20180119_2148'),
    ]

    operations = [
        migrations.CreateModel(
            name='RichText',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=250)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('content', DjangoUeditor.models.UEditorField(blank=True, default='', verbose_name='内容')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='richtext_related', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterField(
            model_name='file',
            name='file',
            field=models.FileField(upload_to='course/files/'),
        ),
        migrations.AlterField(
            model_name='image',
            name='file',
            field=models.FileField(upload_to='course/images/'),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Info',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('description', models.TextField(verbose_name='描述')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='内容')),
                ('image',
                 models.FileField(upload_to='info/', verbose_name='封面上传')),
                ('created_time',
                 models.DateField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '企业动态',
                'verbose_name_plural': '企业动态',
            },
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CompanyInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='产品名称')),
                ('description', models.TextField(verbose_name='描述')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='服务内容')),
                ('image',
                 models.FileField(blank=True,
                                  help_text='该图片用于样式设置,无特别说明时,勿自行上传',
                                  null=True,
                                  upload_to='images_uploads/',
                                  verbose_name='图片上传')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('search', '0033_auto_20180324_1223'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(max_length=2, primary_key=True, serialize=False, verbose_name='id')),
                ('title', models.CharField(max_length=200, verbose_name='标题')),
                ('content', models.TextField(verbose_name='内容')),
                ('img', models.FileField(blank=True, upload_to='./upload/article/', verbose_name='封面图片')),
                ('date_time', models.DateTimeField()),
                ('is_release', models.BooleanField(default=True, verbose_name='是否发表')),
            ],
            options={
                'verbose_name': '资讯',
                'verbose_name_plural': '资讯',
            },
        ),
        migrations.CreateModel(
            name='ArticleType',
            fields=[
                ('id', models.AutoField(max_length=2, primary_key=True, serialize=False, verbose_name='id')),
                ('typeName', models.CharField(max_length=50, verbose_name='分类名称')),
            ],
            options={
                'verbose_name': '资讯分类',
                'verbose_name_plural': '资讯分类',
            },
        ),
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(max_length=2, primary_key=True, serialize=False, verbose_name='id')),
                ('authorName', models.CharField(max_length=50, verbose_name='作者')),
            ],
            options={
                'verbose_name': '作者表',
                'verbose_name_plural': '作者表',
            },
        ),
        migrations.AlterField(
            model_name='companyinfo',
            name='synopsis',
            field=DjangoUeditor.models.UEditorField(verbose_name='公司简介'),
        ),
        migrations.AddField(
            model_name='article',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='search.Author'),
        ),
        migrations.AddField(
            model_name='article',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='search.ArticleType'),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('about_us', '0005_video'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='honor',
            options={'verbose_name': '企业荣誉', 'verbose_name_plural': '企业荣誉'},
        ),
        migrations.AddField(
            model_name='honor',
            name='content',
            field=DjangoUeditor.models.UEditorField(default=1, verbose_name='内容'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='honor',
            name='description',
            field=models.TextField(default=django.utils.timezone.now, verbose_name='描述'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='honor',
            name='image',
            field=models.FileField(blank=True, help_text='该图片用于样式设置,无特别说明时,勿自行上传', null=True, upload_to='images_uploads/', verbose_name='图片上传'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    dependencies = [
        ('about_us', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CompanyShow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('description', models.TextField(verbose_name='描述')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='内容')),
                ('image',
                 models.FileField(blank=True,
                                  help_text='该图片用于样式设置,无特别说明时,勿自行上传',
                                  null=True,
                                  upload_to='images_uploads/',
                                  verbose_name='图片上传')),
            ],
            options={
                'verbose_name': '可通风采',
                'verbose_name_plural': '可通风采',
            },
        ),
        migrations.AlterModelOptions(
            name='companyinfo',
            options={
                'verbose_name': '公司简介',
                'verbose_name_plural': '公司简介'
            },
        ),
        migrations.AlterField(
            model_name='companyinfo',
            name='content',
            field=DjangoUeditor.models.UEditorField(verbose_name='内容'),
        ),
        migrations.AlterField(
            model_name='companyinfo',
            name='title',
            field=models.CharField(max_length=100, verbose_name='标题'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('courses', '0007_course_is_banner'),
    ]

    operations = [
        migrations.AlterField(
            model_name='course',
            name='detail',
            field=DjangoUeditor.models.UEditorField(default='',
                                                    verbose_name='课程详情'),
        ),
        migrations.AlterField(
            model_name='video',
            name='url',
            field=models.FileField(upload_to='course/resource/%Y/%m',
                                   verbose_name='资源文件'),
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    dependencies = [
        ('about_us', '0002_auto_20200704_1146'),
    ]

    operations = [
        migrations.CreateModel(
            name='CompanyCulture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('description', models.TextField(verbose_name='描述')),
                ('content', DjangoUeditor.models.UEditorField(verbose_name='内容')),
                ('image', models.FileField(blank=True, help_text='该图片用于样式设置,无特别说明时,勿自行上传', null=True, upload_to='images_uploads/', verbose_name='图片上传')),
            ],
            options={
                'verbose_name': '企业文化',
                'verbose_name_plural': '企业文化',
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('library', '0002_auto_20170918_2057'),
    ]

    operations = [
        migrations.AlterField(
            model_name='librarys',
            name='content',
            field=DjangoUeditor.models.UEditorField(blank=True,
                                                    default='',
                                                    verbose_name='内容'),
        ),
        migrations.AlterField(
            model_name='librarys',
            name='file',
            field=models.FileField(blank=True,
                                   default=None,
                                   null=True,
                                   upload_to='%Y%m%d69163'),
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = [
        ('library', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='librarys',
            name='content',
            field=DjangoUeditor.models.UEditorField(blank=True,
                                                    default='test',
                                                    verbose_name='内容'),
        ),
        migrations.AlterField(
            model_name='librarys',
            name='file',
            field=models.FileField(blank=True,
                                   default=None,
                                   null=True,
                                   upload_to='%Y%m%d70278'),
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='xxProject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('p_month', models.CharField(default='2019/01', max_length=10, verbose_name='消息月份')),
                ('p_date', models.DateField(blank=True, null=True, verbose_name='任务单时间')),
                ('province', models.CharField(blank=True, max_length=20, null=True, verbose_name='省')),
                ('city', models.CharField(blank=True, max_length=20, null=True, verbose_name='地名')),
                ('area_rank', models.CharField(blank=True, default='市', max_length=20, null=True, verbose_name='级别')),
                ('name', models.CharField(max_length=128, verbose_name='项目名称')),
                ('budget_m', models.IntegerField(blank=True, default=0, null=True, verbose_name='预计金额')),
                ('xxsales', models.CharField(blank=True, max_length=20, null=True, verbose_name='新兴销售人员')),
                ('EWsales', models.CharField(blank=True, max_length=20, null=True, verbose_name='易维对接人')),
                ('p_org', models.CharField(blank=True, choices=[('营销', '营销'), ('生产', '生产'), ('城市服务', '城市服务'), ('智慧水务', '智慧水务')], max_length=40, null=True, verbose_name='大类')),
                ('p_stage', models.CharField(blank=True, choices=[('设想', '设想'), ('立项', '立项'), ('招采', '招采'), ('施工', '施工'), ('暂停', '暂停'), ('取消', '取消')], max_length=40, null=True, verbose_name='阶段')),
                ('total_pr', models.IntegerField(blank=True, default=0, null=True, verbose_name='概率')),
                ('start_cond', models.CharField(max_length=128, verbose_name='启动前置条件')),
                ('start_month', models.DateField(blank=True, null=True, verbose_name='计划开始日期')),
                ('p_memo', DjangoUeditor.models.UEditorField(blank=True, null=True, verbose_name='项目信息')),
                ('finish_memo', DjangoUeditor.models.UEditorField(blank=True, null=True, verbose_name='已完成工作')),
                ('next_memo', DjangoUeditor.models.UEditorField(blank=True, null=True, verbose_name='下一步工作')),
            ],
            options={
                'verbose_name': '聚联项目',
                'verbose_name_plural': '聚联项目',
            },
        ),
        migrations.CreateModel(
            name='xxProjectChange',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='变更内容')),
                ('kind', models.CharField(blank=True, max_length=40, null=True, verbose_name='类型')),
                ('old', models.CharField(blank=True, max_length=40, null=True, verbose_name='原值')),
                ('new', models.CharField(blank=True, max_length=40, null=True, verbose_name='现值')),
                ('c_date', models.DateField(blank=True, default=datetime.datetime.now, verbose_name='变更时间')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xxproject.xxProject', verbose_name='项目')),
            ],
            options={
                'verbose_name': '项目重要变更',
                'verbose_name_plural': '项目重要变更',
            },
        ),
        migrations.CreateModel(
            name='xxProjectResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='资源文件')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xxproject.xxProject', verbose_name='项目')),
            ],
            options={
                'verbose_name': '项目资源',
                'verbose_name_plural': '项目资源',
            },
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organization', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='课程名称')),
                ('desc', models.CharField(max_length=300,
                                          verbose_name='课程描述')),
                ('detail',
                 DjangoUeditor.models.UEditorField(blank=True,
                                                   default='',
                                                   verbose_name='课程详情')),
                ('is_tg',
                 models.BooleanField(default=False, verbose_name='课程首页推广')),
                ('degree',
                 models.CharField(choices=[('cj', '初级'), ('zj', '中级'),
                                           ('gj', '高级')],
                                  default='zj',
                                  max_length=5,
                                  verbose_name='视频级别')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长')),
                ('students', models.IntegerField(default=0,
                                                 verbose_name='学习人数')),
                ('fav_nums', models.IntegerField(default=0,
                                                 verbose_name='收藏人数')),
                ('category',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='课程类别')),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='courses/%Y/%m',
                                   verbose_name='封面图片')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='点击人数')),
                ('tag',
                 models.CharField(blank=True,
                                  default='Python开发',
                                  max_length=20,
                                  null=True,
                                  verbose_name='课程标签')),
                ('kcxz',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='课程须知')),
                ('xdaoshenm',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='能学到什么?')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course_org',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='organization.CourseOrg',
                                   verbose_name='课程机构')),
                ('kcjs_org',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='organization.Teacher',
                                   verbose_name='课程讲师')),
            ],
            options={
                'verbose_name': '课程详情',
                'verbose_name_plural': '课程详情',
                'db_table': 'Course',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='附件名称')),
                ('download',
                 models.FileField(max_length=150,
                                  upload_to='course/resource/%Y/%m',
                                  verbose_name='资源文件')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程名称')),
            ],
            options={
                'verbose_name': '课程附件',
                'verbose_name_plural': '课程附件',
                'db_table': 'CourseResource',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=120,
                                          verbose_name='章节名称')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程名称')),
            ],
            options={
                'verbose_name': '课程章节',
                'verbose_name_plural': '课程章节',
                'db_table': 'Lesson',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=120,
                                          verbose_name='视频名称')),
                ('video_url',
                 models.URLField(blank=True, null=True,
                                 verbose_name='视频资源地址')),
                ('video_time',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='视频时长')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='更新时间')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='章节名称')),
            ],
            options={
                'verbose_name': '视频资源',
                'verbose_name_plural': '视频资源',
                'db_table': 'Video',
            },
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[],
            options={
                'verbose_name': '轮播课程',
                'verbose_name_plural': '轮播课程',
                'proxy': True,
                'indexes': [],
            },
            bases=('courses.course', ),
        ),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='内容')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
            ],
            options={
                'verbose_name': '文章',
                'verbose_name_plural': '文章',
                'db_table': 'Article',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=255)),
                ('author', models.CharField(max_length=255)),
                ('image',
                 models.ImageField(blank=True, db_column='图片', upload_to='')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='内容')),
                ('addDate', models.DateTimeField(blank=True)),
                ('updateDate', models.DateTimeField(blank=True)),
                ('state', models.IntegerField(blank=True)),
                ('commendState', models.IntegerField(blank=True)),
                ('browses', models.IntegerField(blank=True)),
                ('likes', models.IntegerField(blank=True)),
                ('comments', models.IntegerField(blank=True)),
                ('score', models.IntegerField(blank=True)),
                ('newsFile', models.FileField(blank=True, upload_to='')),
                ('isDelete', models.NullBooleanField()),
            ],
            options={
                'db_table': 'news',
                'ordering': ['updateDate'],
            },
            managers=[
                ('newsObj', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='NewsCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='分类')),
                ('description',
                 models.CharField(max_length=255, verbose_name='描述')),
                ('image', models.ImageField(blank=True, upload_to='')),
                ('addDate', models.DateTimeField(blank=True)),
                ('state', models.IntegerField(blank=True)),
                ('isDelete', models.NullBooleanField()),
            ],
            options={
                'db_table': 'newscategory',
                'ordering': ['id'],
            },
            managers=[
                ('categoryObj', django.db.models.manager.Manager()),
            ],
        ),
        migrations.AddField(
            model_name='news',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='kinshow.NewsCategory'),
        ),
    ]
Exemplo n.º 14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='课程名',
                                  max_length=50,
                                  verbose_name='课程名')),
                ('desc',
                 models.CharField(help_text='课程简短描述',
                                  max_length=300,
                                  verbose_name='课程简短描述')),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   help_text='课程详情',
                                                   verbose_name='课程详情')),
                ('url',
                 models.CharField(default='',
                                  help_text='课程介绍视频地址',
                                  max_length=200,
                                  verbose_name='课程介绍视频地址')),
                ('degree',
                 models.IntegerField(choices=[
                     (1, '1年级'), (2, '2年级'), (3, '3年级'),
                     (4, '4年级'), (5, '5年级'), (6, '6年级'), (7, '初一'), (8, '初二'),
                     (9, '初三'), (10, '高一'), (11, '高二'), (12, '高三'), (13, '大一'),
                     (14, '大二'), (15, '大三'), (16, '大四'), (17, '成人')
                 ],
                                     default=3,
                                     help_text='难度',
                                     verbose_name='难度')),
                ('learn_times',
                 models.IntegerField(default=0,
                                     help_text='学习时长(分钟)',
                                     verbose_name='学习时长(分钟)')),
                ('students',
                 models.IntegerField(default=0,
                                     help_text='学习人数',
                                     verbose_name='学习人数')),
                ('fav_nums',
                 models.IntegerField(default=0,
                                     help_text='收藏人数',
                                     verbose_name='收藏人数')),
                ('image',
                 models.ImageField(help_text='封面图',
                                   upload_to='courses/%Y/%m',
                                   verbose_name='封面图')),
                ('click_nums',
                 models.IntegerField(default=0,
                                     help_text='点击数',
                                     verbose_name='点击数')),
                ('category',
                 models.CharField(default='数字艺术',
                                  help_text='课程类别',
                                  max_length=20,
                                  verbose_name='课程类别')),
                ('tag',
                 models.CharField(default='',
                                  help_text='课程标签',
                                  max_length=10,
                                  verbose_name='课程标签')),
                ('youneed_know',
                 models.CharField(default='',
                                  help_text='课程须知',
                                  max_length=300,
                                  verbose_name='课程须知')),
                ('teacher_tell',
                 models.CharField(default='',
                                  help_text='能学到什么',
                                  max_length=300,
                                  verbose_name='能学到什么')),
                ('sold_num',
                 models.IntegerField(default=0,
                                     help_text='已付款人数',
                                     verbose_name='课程销量')),
                ('goods_sn',
                 models.CharField(default='',
                                  help_text='商品唯一货号',
                                  max_length=50,
                                  verbose_name='课程商品唯一货号')),
                ('market_price',
                 models.FloatField(default=0,
                                   help_text='原价',
                                   verbose_name='市场价格')),
                ('shop_price',
                 models.FloatField(default=0,
                                   help_text='促销价',
                                   verbose_name='促销价')),
                ('is_new',
                 models.BooleanField(default=False,
                                     help_text='是否新品',
                                     verbose_name='是否新品')),
                ('is_hot',
                 models.BooleanField(default=False,
                                     help_text='是否热销',
                                     verbose_name='是否热销')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      help_text='添加时间',
                                      verbose_name='添加时间')),
            ],
            options={
                'ordering': ['-id'],
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='资源名称',
                                  max_length=100,
                                  verbose_name='资源名称')),
                ('download',
                 models.FileField(help_text='资源文件',
                                  upload_to='courses/resource/%Y/%m',
                                  verbose_name='资源文件')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      help_text='添加时间',
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(help_text='课程',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'ordering': ['-id'],
                'verbose_name': '课程资源',
                'verbose_name_plural': '课程资源',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='章节名',
                                  max_length=100,
                                  verbose_name='章节名')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      help_text='添加时间',
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(help_text='课程',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='course',
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
            },
        ),
        migrations.CreateModel(
            name='LessonContent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='章节内容名称',
                                  max_length=100,
                                  verbose_name='章节内容名称')),
                ('url',
                 models.CharField(default='',
                                  help_text='章节内容访问地址',
                                  max_length=200,
                                  verbose_name='章节内容访问地址')),
                ('learn_times',
                 models.IntegerField(default=0,
                                     help_text='学习时长(分钟)',
                                     verbose_name='学习时长(分钟)')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      help_text='添加时间',
                                      verbose_name='添加时间')),
                ('lesson',
                 models.ForeignKey(help_text='章节',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='章节')),
            ],
            options={
                'verbose_name': '章节内容',
                'verbose_name_plural': '章节内容',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='视频名',
                                  max_length=100,
                                  verbose_name='视频名')),
                ('url',
                 models.CharField(default='',
                                  help_text='章节视频访问地址',
                                  max_length=200,
                                  verbose_name='章节视频访问地址')),
                ('learn_times',
                 models.IntegerField(default=0,
                                     help_text='学习时长(分钟)',
                                     verbose_name='学习时长(分钟)')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      help_text='添加时间',
                                      verbose_name='添加时间')),
                ('lesson',
                 models.ForeignKey(help_text='章节',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='章节')),
            ],
            options={
                'verbose_name': '章节视频',
                'verbose_name_plural': '章节视频',
            },
        ),
    ]
Exemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='MessageBoard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('type',
                 models.IntegerField(choices=[('投诉', 1), ('建议', 2)],
                                     verbose_name='留言类型')),
                ('from_to', models.CharField(max_length=100,
                                             verbose_name='联系人')),
                ('tel', models.IntegerField(max_length=20,
                                            verbose_name='联系方式')),
                ('content', models.TextField(verbose_name='内容')),
                ('created_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='提交时间')),
            ],
            options={
                'verbose_name_plural': '投诉与建议',
                'ordering': ['-created_time'],
            },
        ),
        migrations.CreateModel(
            name='Network',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('description', models.TextField(verbose_name='描述')),
                ('content',
                 DjangoUeditor.models.UEditorField(verbose_name='内容')),
            ],
            options={
                'verbose_name': '网点',
                'verbose_name_plural': '网点',
            },
        ),
        migrations.CreateModel(
            name='WechatQrCode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('description', models.TextField(verbose_name='描述')),
                ('image',
                 models.FileField(upload_to='wechat/', verbose_name='二维码')),
            ],
            options={
                'verbose_name': '二维码管理',
                'verbose_name_plural': '二维码管理',
            },
        ),
    ]
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('sex', models.CharField(choices=[('未知', '未知'), ('男', '男'), ('女', '女')], default='未知', max_length=50, null=True, verbose_name='性别')),
                ('birthDate', models.DateField(blank=True, default='1970-01-01', null=True, verbose_name='出生日期')),
                ('nickName', models.CharField(default='', max_length=50, null=True, verbose_name='昵称')),
                ('mobile', models.CharField(error_messages={'unique': '该手机号已被注册.'}, help_text='手机账号', max_length=255, verbose_name='手机账号')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=ic_shop.models.Profile.get_avatar_path)),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AreasInfo',
            fields=[
                ('id', models.CharField(default='0', max_length=50, primary_key=True, serialize=False, verbose_name='区域编号')),
                ('name', models.CharField(default='', max_length=50, null=True, verbose_name='区域名称')),
                ('areaLevel', models.CharField(default='', max_length=50, null=True, verbose_name='区域层级')),
                ('parent_id', models.CharField(default='', max_length=50, null=True, verbose_name='区域母编号')),
            ],
        ),
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='默认', error_messages={'unique': '该品牌已经存在'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=255, unique=True, verbose_name='标签名称')),
                ('status', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)], verbose_name='0- 未激活, 1 - 激活, 2- 过期')),
                ('description', models.TextField(blank=True, max_length=1024, verbose_name='描述')),
                ('entry_date', models.DateTimeField(auto_now_add=True, verbose_name='入库时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '商品品牌',
                'verbose_name_plural': '商品品牌',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=1024, null=True, verbose_name='标题')),
                ('description', models.CharField(blank=True, max_length=1024, verbose_name='描述')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '商品评论',
                'verbose_name_plural': '商品评论',
            },
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100, unique=True, verbose_name='公司名称')),
                ('address', models.CharField(default='', max_length=100, null=True, verbose_name='公司地址')),
                ('mobile', models.CharField(default='', max_length=100, null=True, verbose_name='公司电话')),
                ('logo', models.ImageField(blank=True, null=True, upload_to=ic_shop.models.Company.get_logo_path)),
                ('describe', models.CharField(default='', max_length=500, null=True, verbose_name='公司简介')),
                ('pub_date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('offic_acc_url', models.CharField(default='', max_length=100, null=True, verbose_name='公众号URL')),
                ('offic_acc_content', DjangoUeditor.models.UEditorField(blank=True, default='', verbose_name='公众号描述')),
                ('ali_appId', models.CharField(blank=True, default='', max_length=255, null=True, verbose_name='支付宝-公司支付APPID')),
                ('ali_publicKey', models.TextField(blank=True, null=True, verbose_name='支付宝-支付宝公钥')),
                ('ali_privateKey', models.TextField(blank=True, null=True, verbose_name='支付宝-应用私钥')),
                ('ali_notifyUrl', models.CharField(blank=True, max_length=255, null=True, verbose_name='支付宝-支付通知url')),
                ('leader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leader', to=settings.AUTH_USER_MODEL, verbose_name='公司负责人')),
            ],
            options={
                'verbose_name': '公司',
                'verbose_name_plural': '公司',
            },
        ),
        migrations.CreateModel(
            name='CompanyDeviceUpdatePackage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.FloatField(blank=True, default='1.0', null=True, verbose_name='版本号')),
                ('file', models.FileField(blank=True, null=True, upload_to=ic_shop.models.CompanyDeviceUpdatePackage.get_package_path, verbose_name='更新包')),
                ('description', models.CharField(blank=True, default='', max_length=500, null=True, verbose_name='介绍')),
                ('entry_date', models.DateTimeField(auto_now_add=True, verbose_name='入库时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('company', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Company', verbose_name='所属公司')),
            ],
            options={
                'verbose_name': '公司设备升级包',
                'verbose_name_plural': '公司设备升级包',
            },
        ),
        migrations.CreateModel(
            name='CompanyType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(3), django.core.validators.MinValueValidator(0)], verbose_name=' 0:未知,1:厂家,2:经销商, 3: 总公司 ')),
                ('name', models.CharField(default='', max_length=20, null=True, verbose_name='类型名称')),
                ('describe', models.CharField(default='', max_length=200, null=True, verbose_name='类型描述')),
            ],
            options={
                'verbose_name': '公司类型',
                'verbose_name_plural': '公司类型',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='小卧智能冰糕机2型', max_length=1024, null=True, verbose_name='设备名称')),
                ('img', models.FileField(blank=True, null=True, upload_to=ic_shop.models.Device.get_device_path)),
                ('description', models.TextField(blank=True, default='', max_length=1024, verbose_name='描述')),
                ('deviceSn', models.CharField(error_messages={'unique': '设备SN已经存在'}, help_text='设备sn', max_length=50, unique=True, verbose_name='设备SN')),
                ('appVersion', models.CharField(default='', max_length=50, null=True, verbose_name='app版本')),
                ('androidVersion', models.CharField(default='', max_length=50, null=True, verbose_name='安卓系统版本')),
                ('deviceVersion', models.CharField(default='', max_length=50, null=True, verbose_name='下位机固件版本')),
                ('settingTemperature', models.CharField(default='-18', max_length=50, null=True, verbose_name='设定温度')),
                ('temperature', models.CharField(default='-18', max_length=50, null=True, verbose_name='实时温度')),
                ('temperatureThreshold', models.CharField(blank=True, default='10', help_text='最高报警温度阈值', max_length=50, null=True, verbose_name='最高报警温度阈值')),
                ('entry_date', models.DateTimeField(auto_now_add=True, verbose_name='入库时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '设备',
                'verbose_name_plural': '设备',
                'permissions': (('view_device', 'View device'),),
            },
        ),
        migrations.CreateModel(
            name='DeviceAds',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=1024, null=True, verbose_name='标题')),
                ('type', models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)], verbose_name='类型,0-最新动态,1-产品攻略,2-专业技能')),
                ('description', models.TextField(blank=True, default='', max_length=1024, verbose_name='描述')),
                ('content', DjangoUeditor.models.UEditorField(blank=True, default='', verbose_name='内容')),
                ('upload_time', models.DateTimeField(default=django.utils.timezone.now, null=True, verbose_name='上传时间')),
                ('refresh_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('read_count', models.CharField(default='0', max_length=30, verbose_name='阅读数')),
                ('like_count', models.CharField(default='0', max_length=30, verbose_name='点赞数')),
            ],
            options={
                'verbose_name': '资讯广告',
                'verbose_name_plural': '资讯广告',
            },
        ),
        migrations.CreateModel(
            name='DeviceLocationHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('longitude', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='经度')),
                ('latitude', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='纬度')),
                ('provinceKey', models.CharField(default='', max_length=50, null=True, verbose_name='省份编码')),
                ('provinceName', models.CharField(default='', max_length=50, null=True, verbose_name='省份')),
                ('cityKey', models.CharField(default='', max_length=50, null=True, verbose_name='县市编码')),
                ('cityName', models.CharField(default='', max_length=50, null=True, verbose_name='县市')),
                ('regionKey', models.CharField(default='', max_length=50, null=True, verbose_name='区编码')),
                ('regionName', models.CharField(default='', max_length=50, null=True, verbose_name='区')),
                ('addressDetail', models.CharField(blank=True, default='', max_length=200, null=True, verbose_name='地址详情')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '设备历史地址',
                'verbose_name_plural': '设备历史地址',
            },
        ),
        migrations.CreateModel(
            name='DeviceOperationCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deviceSn', models.CharField(max_length=255, verbose_name='所属设备')),
                ('deviceVerifyCode', models.CharField(default='', max_length=200, null=True, verbose_name='设备操作校验码')),
                ('codeUpdateTime', models.CharField(default='', max_length=200, null=True, verbose_name='验证码更新时间戳')),
                ('timeExpired', models.CharField(default='2', max_length=1024, null=True, verbose_name='检验码过期时间间隔')),
                ('upload_time', models.DateTimeField(auto_now=True, null=True, verbose_name='上传时间')),
            ],
            options={
                'verbose_name': '设备操作校验',
                'verbose_name_plural': '商品种类',
            },
        ),
        migrations.CreateModel(
            name='DeviceSlot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slotNum', models.IntegerField(null=True, validators=[django.core.validators.MaxValueValidator(30), django.core.validators.MinValueValidator(1)], verbose_name='设备通道序号(1-30)')),
                ('status', models.IntegerField(default=1, help_text='-0- 未激活, 1 - 激活, 2 - 过期, 3 - 已被使用', validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)], verbose_name='机器状态')),
                ('faultCode', models.CharField(blank=True, default=-1, help_text='1:正常 , 2:送料电机故障,3:顶出的电机故障,4、电动门电磁阀故障', max_length=50, null=True, verbose_name='故障状态')),
                ('max_capacity', models.IntegerField(null=True, validators=[django.core.validators.MaxValueValidator(30), django.core.validators.MinValueValidator(1)], verbose_name='设备通道容量(1-30)')),
            ],
            options={
                'verbose_name': '设备通道',
                'verbose_name_plural': '设备通道',
                'default_related_name': 'deviceSlot',
            },
        ),
        migrations.CreateModel(
            name='DeviceType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=1024, null=True, verbose_name='设备型号名称')),
                ('description', models.TextField(blank=True, default='', verbose_name='描述')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '设备类型',
                'verbose_name_plural': '设备类型',
            },
        ),
        migrations.CreateModel(
            name='ImageUploader',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img', models.FileField(upload_to='upload')),
                ('upload_time', models.DateTimeField(auto_now=True, null=True, verbose_name='上传时间')),
            ],
            options={
                'verbose_name': '商品图片',
                'verbose_name_plural': '商品图片',
            },
        ),
        migrations.CreateModel(
            name='ItemOrder',
            fields=[
                ('orderNum', models.BigIntegerField(error_messages={'unique': '订单号重复'}, primary_key=True, serialize=False, verbose_name='订单号')),
                ('orderTitle', models.CharField(error_messages={'null': '需要提供商品名称或者相关标题'}, max_length=255, verbose_name='订单标题')),
                ('totalCount', models.IntegerField(error_messages={'null': '购买商品总数'}, verbose_name='购买商品总数')),
                ('actualTotalCount', models.IntegerField(default=0, error_messages={'null': '实际出货商品总数'}, verbose_name='实际出货数量')),
                ('totalPrize', models.FloatField(error_messages={'null': '需要提供商品总价'}, verbose_name='总价')),
                ('deviceSlot_id', models.CharField(error_messages={'null': '需要提供所属通道ID'}, help_text='deviceSlot_id', max_length=255, null=True)),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('update_timestamp', models.BigIntegerField(verbose_name='操作时间戳')),
            ],
            options={
                'verbose_name': '商品订单',
                'verbose_name_plural': '商品订单',
            },
        ),
        migrations.CreateModel(
            name='ProfileAvatar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img', models.FileField(upload_to='upload/avatar')),
                ('upload_time', models.DateTimeField(auto_now=True, null=True, verbose_name='上传时间')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '头像',
                'verbose_name_plural': '头像',
            },
        ),
        migrations.CreateModel(
            name='ProfileType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=20, verbose_name='用户类型')),
                ('description', models.CharField(default='', max_length=1024, verbose_name='描述')),
            ],
            options={
                'verbose_name': '用户类型',
                'verbose_name_plural': '用户类型',
            },
        ),
        migrations.CreateModel(
            name='ShopItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='默认', error_messages={'unique': '该商品名称已经存在'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=255, unique=True, verbose_name='商品名称')),
                ('description', models.CharField(blank=True, max_length=1024, verbose_name='描述')),
                ('content', DjangoUeditor.models.UEditorField(blank=True, default='', verbose_name='内容')),
                ('prize', models.FloatField(error_messages={'unique': '价格不能低于0'}, validators=[django.core.validators.MaxValueValidator(999999), django.core.validators.MinValueValidator(0)], verbose_name='价格')),
                ('originalPrize', models.FloatField(help_text='出厂价格', null=True, validators=[django.core.validators.MaxValueValidator(999999), django.core.validators.MinValueValidator(0)], verbose_name='出厂价格')),
                ('status', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)], verbose_name='-0- 未激活, 1 - 激活, 2 - 过期')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='上架时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('img', models.FileField(blank=True, null=True, upload_to=ic_shop.models.ShopItem.get_shopItem_path)),
                ('brand', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Brand', verbose_name='所属品牌')),
            ],
            options={
                'verbose_name': '商品',
                'verbose_name_plural': '商品',
            },
        ),
        migrations.CreateModel(
            name='ShopItemCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=1024, null=True, verbose_name='商品种类名称')),
                ('upload_time', models.DateTimeField(auto_now=True, null=True, verbose_name='上传时间')),
            ],
            options={
                'verbose_name': '商品种类',
                'verbose_name_plural': '商品种类',
            },
        ),
        migrations.CreateModel(
            name='ShopItemStorage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('currentStorage', models.CharField(max_length=50, null=True, verbose_name='当前存货量')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('deviceSlot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='deviceSlots', to='ic_shop.DeviceSlot', verbose_name='所属通道')),
                ('shopItem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shopItems', to='ic_shop.ShopItem', verbose_name='冰糕')),
            ],
            options={
                'verbose_name': '设备商品存货',
                'verbose_name_plural': '设备商品存货',
            },
        ),
        migrations.CreateModel(
            name='ShopItemStorageHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.CharField(max_length=50, null=True, verbose_name='所属设备id')),
                ('pre_shopItem_id', models.CharField(max_length=50, null=True, verbose_name='之前商品ID')),
                ('user_id', models.CharField(max_length=50, null=True, verbose_name='操作员ID')),
                ('pre_currentStorage', models.CharField(max_length=50, null=True, verbose_name='更新之前存货量')),
                ('currentStorage', models.CharField(max_length=50, null=True, verbose_name='当前存货量')),
                ('update_timestamp', models.BigIntegerField(default=0, verbose_name='操作时间戳')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('deviceSlot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.DeviceSlot', verbose_name='所属通道')),
                ('shopItem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ShopItem', verbose_name='冰糕')),
            ],
            options={
                'verbose_name': '设备商品存货历史记录',
                'verbose_name_plural': '设备商品存货历史记录',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(error_messages={'unique': 'A title with that tag already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, verbose_name='标签名称')),
                ('description', models.TextField(blank=True, default='', verbose_name='描述')),
            ],
            options={
                'verbose_name': '标签',
                'verbose_name_plural': '标签',
            },
        ),
        migrations.CreateModel(
            name='UserDevice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='DeviceLocation',
            fields=[
                ('longitude', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='经度')),
                ('latitude', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='纬度')),
                ('provinceKey', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='省份编码')),
                ('provinceName', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='省份')),
                ('cityKey', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='县市编码')),
                ('cityName', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='县市')),
                ('regionKey', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='区编码')),
                ('regionName', models.CharField(blank=True, default='', max_length=50, null=True, verbose_name='区')),
                ('addressDetail', models.CharField(blank=True, default='', max_length=200, null=True, verbose_name='地址详情')),
                ('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('device', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='ic_shop.Device', verbose_name='所属设备')),
            ],
            options={
                'verbose_name': '设备地址',
                'verbose_name_plural': '设备地址',
            },
        ),
        migrations.CreateModel(
            name='DeviceMacStatus',
            fields=[
                ('status', models.IntegerField(default=1, help_text='0:未激活状态,1:正常运作,2、用户购买中,3、补货中,4:离线状态,5:报废,', validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(0)], verbose_name='0:未激活状态,1:正常运作,2、用户购买中,3、补货中,4:离线状态,5:报废,')),
                ('faultStatus', models.IntegerField(default='1', help_text='1-:正常, 2:通道电机故障, 3:横送系统故障, 4:升降系统故障', validators=[django.core.validators.MaxValueValidator(4), django.core.validators.MinValueValidator(1)], verbose_name='1-:正常, 2:通道电机故障, 3:横送系统故障, 4:升降系统故障')),
                ('temperatureStatus', models.IntegerField(default='1', help_text='(高温状态) 0-异常 1-:正常', validators=[django.core.validators.MaxValueValidator(1), django.core.validators.MinValueValidator(0)], verbose_name='(高温状态) 0-异常 1-:正常')),
                ('republishStatus', models.IntegerField(default='1', help_text='设备补货状态码,0:无需补货,1:待补货,2:亟待补货', validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)], verbose_name='设备补货状态码,0:无需补货,1:待补货,2:亟待补货')),
                ('device', models.OneToOneField(help_text='device_id', on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='ic_shop.Device', verbose_name='所属设备')),
            ],
            options={
                'verbose_name': '设备状态',
                'verbose_name_plural': '设备状态',
            },
        ),
        migrations.CreateModel(
            name='ItemOrderStatus',
            fields=[
                ('orderStatus', models.IntegerField(default=0, help_text='0- 等待支付中, 1 - 已支付, 2 - 已取消, 3 - 未付款交易超时关闭,或支付完成后全额退款, 4 - 退款中 5- 该订单未被扫描 6- 交易结束,不可退款  ', null=True, validators=[django.core.validators.MaxValueValidator(6), django.core.validators.MinValueValidator(0)], verbose_name='0- 等待支付中, 1 - 已支付, 2 - 已取消, 3 - 未付款交易超时关闭,或支付完成后全额退款, 4 - 退款中 5- 该订单未被扫描 6- 交易结束,不可退款  ')),
                ('pub_date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='发表时间')),
                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('update_timestamp', models.BigIntegerField(null=True, verbose_name='操作时间戳')),
                ('buyer_user_id', models.CharField(blank=True, help_text='支付宝用户ID, 默认生成, 无需填写', max_length=255, null=True)),
                ('buyer_logon_id', models.CharField(blank=True, help_text='支付宝用户登录ID, 默认生成, 无需填写', max_length=255, null=True)),
                ('company_id', models.IntegerField(blank=True, help_text='公司ID', null=True)),
                ('orderNum', models.OneToOneField(default=1, error_messages={'null': '需要提供该订单的商品ID'}, help_text='itemOrder_id', on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='ic_shop.ItemOrder', verbose_name='所属订单')),
                ('orderCompleteStatus', models.IntegerField(default=0, help_text='0 - 未出货, 1 -已出货  2-部分出货', null=True, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)], verbose_name='0 - 未出货 1 - 已出货  2-部分出货')),
            ],
            options={
                'verbose_name': '订单状态',
                'verbose_name_plural': '订单状态',
            },
        ),
        migrations.AddField(
            model_name='userdevice',
            name='device',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='devices', to='ic_shop.Device', verbose_name='设备'),
        ),
        migrations.AddField(
            model_name='userdevice',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profiles', to=settings.AUTH_USER_MODEL, verbose_name='用户'),
        ),
        migrations.AddField(
            model_name='shopitem',
            name='category',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ShopItemCategory', verbose_name='商品种类'),
        ),
        migrations.AddField(
            model_name='itemorder',
            name='company',
            field=models.ForeignKey(error_messages={'null': '需要提供公司ID'}, help_text='company_id', null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Company', verbose_name='所属公司'),
        ),
        migrations.AddField(
            model_name='itemorder',
            name='device',
            field=models.ForeignKey(error_messages={'null': '需要提供所属设备ID'}, help_text='device_id', null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Device'),
        ),
        migrations.AddField(
            model_name='itemorder',
            name='shopItem',
            field=models.ForeignKey(error_messages={'null': '需要提供该订单的商品ID'}, help_text='shopItem_id', null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ShopItem', verbose_name='所属商品'),
        ),
        migrations.AddField(
            model_name='imageuploader',
            name='shopItem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ShopItem'),
        ),
        migrations.AddField(
            model_name='deviceslot',
            name='device',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='deviceSlot', to='ic_shop.Device', verbose_name='设备'),
        ),
        migrations.AddField(
            model_name='deviceslot',
            name='shopItem',
            field=models.ManyToManyField(related_name='deviceSlot', through='ic_shop.ShopItemStorage', to='ic_shop.ShopItem', verbose_name='冰糕'),
        ),
        migrations.AlterUniqueTogether(
            name='deviceoperationcode',
            unique_together=set([('deviceSn', 'deviceVerifyCode')]),
        ),
        migrations.AddField(
            model_name='devicelocationhistory',
            name='device',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Device', verbose_name='所属设备'),
        ),
        migrations.AddField(
            model_name='device',
            name='company',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Company', verbose_name='所属公司'),
        ),
        migrations.AddField(
            model_name='device',
            name='deviceType',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.DeviceType', verbose_name='所属设备类型'),
        ),
        migrations.AddField(
            model_name='device',
            name='operator',
            field=models.ManyToManyField(blank=True, through='ic_shop.UserDevice', to=settings.AUTH_USER_MODEL, verbose_name='设备'),
        ),
        migrations.AddField(
            model_name='company',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.CompanyType', verbose_name='公司类型'),
        ),
        migrations.AddField(
            model_name='comment',
            name='shopItem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ShopItem', verbose_name='所属商品'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='所属用户'),
        ),
        migrations.AddField(
            model_name='profile',
            name='company',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.Company', verbose_name='所属公司'),
        ),
        migrations.AddField(
            model_name='profile',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='profile',
            name='supervisor',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='上级用户'),
        ),
        migrations.AddField(
            model_name='profile',
            name='userType',
            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, to='ic_shop.ProfileType', verbose_name='用户类型'),
        ),
        migrations.AddField(
            model_name='profile',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
        migrations.AlterUniqueTogether(
            name='userdevice',
            unique_together=set([('device', 'user')]),
        ),
        migrations.AlterUniqueTogether(
            name='deviceslot',
            unique_together=set([('device', 'slotNum')]),
        ),
    ]
Exemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('org', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='课程名')),
                ('desc', models.TextField(verbose_name='课程描述')),
                ('level',
                 models.CharField(choices=[('primary', '初级'), ('middle', '中级'),
                                           ('advanced', '高级')],
                                  default='primary',
                                  max_length=20)),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   verbose_name='课程详情')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('cover',
                 models.ImageField(default='course/cover/default.png',
                                   upload_to='course/cover/%Y/%m',
                                   verbose_name='课程封面')),
                ('tag',
                 models.CharField(default='',
                                  max_length=20,
                                  verbose_name='课程标签')),
                ('tips',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='课程须知')),
                ('tell_you',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='老师告诉你')),
                ('is_banner',
                 models.BooleanField(default=False, verbose_name='是否轮播')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='点击量')),
                ('stu_nums', models.IntegerField(default=0,
                                                 verbose_name='学习人数')),
                ('fav_nums', models.IntegerField(default=0,
                                                 verbose_name='收藏人数')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='CourseCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='课程类别')),
                ('index',
                 models.SmallIntegerField(default=100, verbose_name='类别排序')),
            ],
            options={
                'verbose_name': '课程类别',
                'verbose_name_plural': '课程类别',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='章节名')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Course',
                                   verbose_name='所属课程')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
            },
        ),
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='资源名称')),
                ('download',
                 models.FileField(upload_to='course/resource/%Y/%m',
                                  verbose_name='资源文件')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Course',
                                   verbose_name='所属课程')),
            ],
            options={
                'verbose_name': '课程资源',
                'verbose_name_plural': '课程资源',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='视频名称')),
                ('url',
                 models.URLField(default='', unique=True,
                                 verbose_name='访问地址')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Lesson',
                                   verbose_name='所属章节')),
            ],
            options={
                'verbose_name': '视频',
                'verbose_name_plural': '视频',
            },
        ),
        migrations.AddField(
            model_name='course',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='course.CourseCategory',
                verbose_name='课程类别'),
        ),
        migrations.AddField(
            model_name='course',
            name='org',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='org.Org',
                verbose_name='所属机构'),
        ),
        migrations.AddField(
            model_name='course',
            name='teacher',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='org.Teacher',
                verbose_name='所属教师'),
        ),
    ]
Exemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=256,
                                  verbose_name='\u6807\u9898')),
                ('slug',
                 models.CharField(db_index=True,
                                  max_length=256,
                                  verbose_name='\u7f51\u5740')),
                ('content',
                 DjangoUeditor.models.UEditorField(
                     blank=True, default='', verbose_name='\u5185\u5bb9')),
                ('published',
                 models.BooleanField(default=True,
                                     verbose_name='\u6b63\u662f\u53d1\u5e03')),
                ('pub_date',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u53d1\u8868\u65f6\u95f4')),
                ('update_time',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='\u66f4\u65b0\u65f6\u95f4')),
                ('author',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='\u4f5c\u8005')),
            ],
            options={
                'verbose_name': '\u6559\u7a0b',
                'verbose_name_plural': '\u6559\u7a0b',
            },
        ),
        migrations.CreateModel(
            name='AutoTest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=256,
                                  verbose_name='\u63a5\u53e3\u540d\u79f0')),
                ('is_run',
                 models.BooleanField(default=False,
                                     verbose_name='\u72b6\u6001')),
                ('pre_data_file',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='uploads/script/',
                                  verbose_name='\u6570\u636e\u6587\u4ef6')),
                ('script_path',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='uploads/script/',
                                  verbose_name='\u7528\u4f8b\u6587\u4ef6')),
                ('schedule',
                 models.CharField(blank=True,
                                  max_length=256,
                                  null=True,
                                  verbose_name='\u8fdb\u5ea6')),
                ('result',
                 models.FileField(upload_to='uploads/script/',
                                  verbose_name='\u6267\u884c\u7ed3\u679c')),
                ('creater',
                 models.CharField(blank=True,
                                  max_length=256,
                                  null=True,
                                  verbose_name='\u521b\u5efa\u4eba')),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': '\u7528\u4f8b\u7ba1\u7406',
                'verbose_name_plural': '\u7528\u4f8b\u7ba1\u7406',
            },
        ),
        migrations.CreateModel(
            name='ChartConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('success', models.IntegerField()),
                ('failed', models.IntegerField()),
            ],
            options={
                'verbose_name': '\u7ed3\u679c\u56fe\u8868',
                'verbose_name_plural': '\u7ed3\u679c\u56fe\u8868',
            },
        ),
        migrations.CreateModel(
            name='Column',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=256,
                                  verbose_name='\u680f\u76ee\u540d\u79f0')),
                ('slug',
                 models.CharField(db_index=True,
                                  max_length=256,
                                  verbose_name='\u680f\u76ee\u7f51\u5740')),
                ('intro',
                 models.TextField(default='',
                                  verbose_name='\u680f\u76ee\u7b80\u4ecb')),
                ('nav_display',
                 models.BooleanField(default=False,
                                     verbose_name='\u5bfc\u822a\u663e\u793a')),
                ('home_display',
                 models.BooleanField(default=False,
                                     verbose_name='\u9996\u9875\u663e\u793a')),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': '\u680f\u76ee',
                'verbose_name_plural': '\u680f\u76ee',
            },
        ),
        migrations.CreateModel(
            name='ObjectConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=256,
                                          verbose_name='\u7c7b')),
            ],
            options={
                'verbose_name': '\u7c7b\u914d\u7f6e',
                'verbose_name_plural': '\u7c7b\u914d\u7f6e',
            },
        ),
        migrations.CreateModel(
            name='ProjectConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=256,
                                  verbose_name='\u63a5\u53e3\u9879\u76ee')),
            ],
            options={
                'verbose_name': '\u9879\u76ee\u914d\u7f6e',
                'verbose_name_plural': '\u9879\u76ee\u914d\u7f6e',
            },
        ),
        migrations.AddField(
            model_name='objectconfig',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='service.ProjectConfig',
                verbose_name='\u6240\u5c5e\u9879\u76ee'),
        ),
        migrations.AddField(
            model_name='autotest',
            name='class_name',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='service.ObjectConfig',
                verbose_name='\u7c7b'),
        ),
        migrations.AddField(
            model_name='autotest',
            name='project_name',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='service.ProjectConfig',
                verbose_name='\u9879\u76ee'),
        ),
        migrations.AddField(
            model_name='article',
            name='column',
            field=models.ManyToManyField(
                to='service.Column', verbose_name='\u5f52\u5c5e\u680f\u76ee'),
        ),
    ]
Exemplo n.º 19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 6, 27, 20, 2, 0, 227269),
                                      verbose_name='添加时间')),
                ('name', models.CharField(max_length=50, verbose_name='课程名称')),
                ('desc', models.CharField(max_length=500,
                                          verbose_name='课程描述')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('degree',
                 models.CharField(choices=[('cj', '初级'), ('zj', '中级'),
                                           ('gj', '高级')],
                                  max_length=2,
                                  verbose_name='难度')),
                ('students', models.IntegerField(default=0,
                                                 verbose_name='学习人数')),
                ('fav_nums', models.IntegerField(default=0,
                                                 verbose_name='收藏人数')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='点击数')),
                ('category',
                 models.CharField(default='后端开发',
                                  max_length=20,
                                  verbose_name='课程类别')),
                ('tag',
                 models.CharField(default='',
                                  max_length=10,
                                  verbose_name='课程标签')),
                ('youneed_know',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='课程须知')),
                ('teacher_tell',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='老师告诉你')),
                ('notice',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='课程公告')),
                ('image',
                 models.ImageField(upload_to='courses/%Y/%m',
                                   verbose_name='封面图')),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   verbose_name='课程详情')),
                ('is_classics',
                 models.BooleanField(default=False, verbose_name='是否经典')),
                ('is_banner',
                 models.BooleanField(default=False, verbose_name='是否广告位')),
            ],
            options={
                'verbose_name': '课程信息',
                'verbose_name_plural': '课程信息',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 6, 27, 20, 2, 0, 227269),
                                      verbose_name='添加时间')),
                ('name', models.CharField(max_length=100, verbose_name='章节名')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '课程章节',
                'verbose_name_plural': '课程章节',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 6, 27, 20, 2, 0, 227269),
                                      verbose_name='添加时间')),
                ('name', models.CharField(max_length=100, verbose_name='视频名')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('url', models.CharField(max_length=1000,
                                         verbose_name='访问地址')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='章节')),
            ],
            options={
                'verbose_name': '课程视频',
                'verbose_name_plural': '课程视频',
            },
        ),
        migrations.CreateModel(
            name='CourseTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 6, 27, 20, 2, 0, 227269),
                                      verbose_name='添加时间')),
                ('tag',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='标签')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '课程标签',
                'verbose_name_plural': '课程标签',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 6, 27, 20, 2, 0, 227269),
                                      verbose_name='添加时间')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('file',
                 models.FileField(max_length=200,
                                  upload_to='course/resourse/%Y/%m',
                                  verbose_name='下载地址')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '课程资源',
                'verbose_name_plural': '课程资源',
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='课程名')),
                ('desc', models.CharField(max_length=300, verbose_name='课程描述')),
                ('detail', DjangoUeditor.models.UEditorField(default='', verbose_name='课程详情')),
                ('degree', models.CharField(choices=[('cj', '初级'), ('zj', '中级'), ('gj', '高级')], max_length=2, verbose_name='难度')),
                ('learn_times', models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('students', models.IntegerField(default=0, verbose_name='学习人数')),
                ('fav_nums', models.IntegerField(default=0, verbose_name='收藏人数')),
                ('image', models.ImageField(upload_to='courses/%Y/%m', verbose_name='封面图')),
                ('click_nums', models.IntegerField(default=0, verbose_name='点击数')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='章节名')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='课程')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='视频名')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Lesson', verbose_name='章节')),
            ],
            options={
                'verbose_name': '视频',
                'verbose_name_plural': '视频',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='资源文件')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='课程')),
            ],
            options={
                'verbose_name': '课程资源',
                'verbose_name_plural': '课程资源',
            },
        ),
    ]
Exemplo n.º 21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organization', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='\u8bfe\u7a0b\u540d')),
                ('desc', models.CharField(max_length=500, verbose_name='\u8bfe\u7a0b\u63cf\u8ff0')),
                ('detail', DjangoUeditor.models.UEditorField(default='', verbose_name='\u8bfe\u7a0b\u8be6\u60c5')),
                ('is_banner', models.BooleanField(default=False, verbose_name='\u662f\u5426\u8f6e\u64ad')),
                ('degree', models.CharField(choices=[('cj', '\u521d\u7ea7'), ('zj', '\u4e2d\u7ea7'), ('gj', '\u9ad8\u7ea7')], max_length=2, verbose_name='\u96be\u5ea6')),
                ('learn_times', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u65f6\u957f(\u5206\u949f\u6570)')),
                ('students', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u4eba\u6570')),
                ('fav_nums', models.IntegerField(default=0, verbose_name='\u6536\u85cf\u4eba\u6570')),
                ('image', models.ImageField(upload_to='courses/%Y/%m', verbose_name='\u5c01\u9762\u56fe')),
                ('click_nums', models.IntegerField(default=0, verbose_name='\u70b9\u51fb\u6570')),
                ('category', models.CharField(default='\u540e\u7aef\u5f00\u53d1', max_length=20, verbose_name='\u8bfe\u7a0b\u7c7b\u522b')),
                ('tag', models.CharField(default='', max_length=10, verbose_name='\u8bfe\u7a0b\u6807\u7b7e')),
                ('youneed_know', models.CharField(default='', max_length=300, verbose_name='\u8bfe\u7a0b\u987b\u77e5')),
                ('teacher_tell', models.CharField(default='', max_length=300, verbose_name='\u8001\u5e08\u544a\u8bc9\u4f60')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('course_org', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organization.CourseOrg', verbose_name='\u8bfe\u7a0b\u673a\u6784')),
                ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='organization.Teacher', verbose_name='\u8bb2\u5e08')),
            ],
            options={
                'verbose_name': '\u8bfe\u7a0b',
                'verbose_name_plural': '\u8bfe\u7a0b',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='\u540d\u79f0')),
                ('download', models.FileField(upload_to='course/resource/%Y/%m', verbose_name='\u8d44\u6e90\u6587\u4ef6')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='\u8bfe\u7a0b')),
            ],
            options={
                'verbose_name': '\u8bfe\u7a0b\u8d44\u6e90',
                'verbose_name_plural': '\u8bfe\u7a0b\u8d44\u6e90',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='\u7ae0\u8282\u540d')),
                ('learn_times', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u65f6\u957f\uff08\u5206\u949f\u6570\uff09')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course', verbose_name='\u8bfe\u7a0b')),
            ],
            options={
                'verbose_name': '\u7ae0\u8282',
                'verbose_name_plural': '\u7ae0\u8282',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='\u89c6\u9891\u540d')),
                ('learn_times', models.IntegerField(default=0, verbose_name='\u5b66\u4e60\u65f6\u957f\uff08\u5206\u949f\u6570\uff09')),
                ('url', models.CharField(default='', max_length=200, verbose_name='\u8bbf\u95ee\u5730\u5740')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Lesson', verbose_name='\u7ae0\u8282')),
            ],
            options={
                'verbose_name': '\u89c6\u9891',
                'verbose_name_plural': '\u89c6\u9891',
            },
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[
            ],
            options={
                'verbose_name': '\u8f6e\u64ad\u8bfe\u7a0b',
                'proxy': True,
                'verbose_name_plural': '\u8f6e\u64ad\u8bfe\u7a0b',
            },
            bases=('courses.course',),
        ),
    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='ForumUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('nickname',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('avatar',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('signature',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('website', models.URLField(blank=True, null=True)),
                ('company',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('role', models.IntegerField(blank=True, null=True)),
                ('balance', models.IntegerField(blank=True, null=True)),
                ('reputation', models.IntegerField(blank=True, null=True)),
                ('self_intro',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('updated', models.DateTimeField(blank=True, null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('creatdate',
                 models.DateTimeField(auto_now=True, verbose_name='创建时间')),
                ('update',
                 models.DateTimeField(default=datetime.datetime(2018,
                                                                11,
                                                                10,
                                                                10,
                                                                5,
                                                                33,
                                                                451401,
                                                                tzinfo=utc),
                                      verbose_name='更新时间')),
                ('count',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='点击次数')),
                ('name', models.CharField(blank=True, max_length=100)),
                ('content',
                 DjangoUeditor.models.UEditorField(blank=True,
                                                   verbose_name='内容\t')),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('userId', models.IntegerField(blank=True, null=True)),
                ('fid', models.IntegerField(blank=True, null=True)),
                ('file', models.FileField(upload_to='upload/')),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('describe',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('lookNumber', models.IntegerField(blank=True, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('updated', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserCenterTitle',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=10,
                                  null=True,
                                  verbose_name='标题名称')),
                ('weight',
                 models.IntegerField(
                     default=1,
                     validators=[
                         django.core.validators.MaxValueValidator(100),
                         django.core.validators.MinValueValidator(1)
                     ],
                     verbose_name='1-100')),
                ('icon',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='标题的icon')),
                ('isSuper',
                 models.BooleanField(default=False, verbose_name='是否是超级用户所有')),
            ],
        ),
        migrations.AddField(
            model_name='blog',
            name='topic',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='blog.Topic'),
        ),
    ]
Exemplo n.º 23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0002_auto_20181120_0930'),
        ('major', '0007_chaptertask_task_file'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='TeacherEvaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.TextField(help_text='评价内容', verbose_name='评价内容')),
                ('evaluation_time', models.DateTimeField(default=django.utils.timezone.now, help_text='评价时间', verbose_name='评价时间')),
                ('is_pass', models.IntegerField(choices=[(1, '未通过'), (2, '通过')], default=1, help_text='是否通过', verbose_name='是否通过')),
                ('mission', models.ForeignKey(help_text='任务id', on_delete=django.db.models.deletion.CASCADE, related_name='task_evaluation', to='major.ChapterTask', verbose_name='任务id')),
                ('teacher', models.ForeignKey(help_text='老师id', on_delete=django.db.models.deletion.CASCADE, to='users.Teacher', verbose_name='老师id')),
                ('user', models.ForeignKey(help_text='用户名', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户名')),
            ],
            options={
                'verbose_name': '老师评价',
                'verbose_name_plural': '老师评价',
            },
        ),
        migrations.CreateModel(
            name='UserAchievement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('class_rankings', models.IntegerField(default=0, verbose_name='班级排名')),
                ('monthly_rankings', models.IntegerField(default=0, verbose_name='月排名')),
                ('total_ranking', models.IntegerField(default=0, verbose_name='总排名')),
                ('total_ranking_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='排名时间')),
                ('estimated_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='预计完成时间')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '学生成绩表',
                'verbose_name_plural': '学生成绩表',
            },
        ),
        migrations.CreateModel(
            name='UserBlog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('blog_name', models.CharField(help_text='博客名', max_length=255, verbose_name='博客名')),
                ('blog_body', DjangoUeditor.models.UEditorField(default='', help_text='博客正文', verbose_name='博客正文')),
                ('blog_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户名')),
            ],
            options={
                'verbose_name': '用户博客',
                'verbose_name_plural': '用户博客',
            },
        ),
        migrations.CreateModel(
            name='UserChapter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course_end', models.BooleanField(default=False, help_text='课程是否完成,True或False', verbose_name='课程是否完成')),
                ('chapter_end', models.BooleanField(default=False, help_text='章节是否完成,True或False', verbose_name='章节是否完成')),
                ('end_time', models.DateTimeField(default=django.utils.timezone.now, help_text='完成时间', verbose_name='完成时间')),
                ('start_time', models.DateTimeField(default=django.utils.timezone.now, help_text='开始时间', verbose_name='开始时间')),
                ('chapter', models.ForeignKey(help_text='章节id', on_delete=django.db.models.deletion.CASCADE, to='major.Chapter', verbose_name='章节名')),
                ('course', models.ForeignKey(help_text='课程id', on_delete=django.db.models.deletion.CASCADE, to='major.Major', verbose_name='课程名')),
                ('user', models.ForeignKey(help_text='用户id', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='学生名')),
            ],
            options={
                'verbose_name': '用户章节信息',
                'verbose_name_plural': '用户章节信息',
            },
        ),
        migrations.CreateModel(
            name='UserCourse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='开始学习时间')),
                ('end_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='结束时间')),
                ('complete', models.BooleanField(default=False, verbose_name='是否学完')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='major.Major', verbose_name='课程名')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='学生名')),
            ],
            options={
                'verbose_name': '学生课程',
                'verbose_name_plural': '学生课程',
            },
        ),
        migrations.CreateModel(
            name='UserMajor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='开通时间')),
                ('end_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='结束时间')),
                ('major', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='major.Major', verbose_name='专业名')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='学生名')),
            ],
            options={
                'verbose_name': '学生专业',
                'verbose_name_plural': '学生专业',
            },
        ),
        migrations.CreateModel(
            name='UserMission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_info', models.TextField(help_text='任务完成说明', verbose_name='任务完成说明')),
                ('task_end', models.BooleanField(default=False, help_text='任务是否完成', verbose_name='任务是否完成')),
                ('file', models.FileField(blank=True, help_text='上传文件', max_length=1000, null=True, upload_to='mission/%Y/%m/%d/', verbose_name='上传文件')),
                ('video_file', models.FileField(blank=True, help_text='上传视频文件', max_length=1000, null=True, upload_to='mission/%Y/%m/%d/', verbose_name='上传视频文件')),
                ('image', models.ImageField(blank=True, null=True, upload_to='mission/%Y/%m/%d/', verbose_name='上传图片文件')),
                ('submit_time', models.DateTimeField(default=django.utils.timezone.now, help_text='提交时间', verbose_name='提交时间')),
                ('complete_time', models.DateTimeField(blank=True, help_text='完成时间', null=True, verbose_name='完成时间')),
                ('chapter', models.ForeignKey(help_text='章节id', on_delete=django.db.models.deletion.CASCADE, to='major.Chapter', verbose_name='章节id')),
                ('mission', models.ForeignKey(help_text='任务id', on_delete=django.db.models.deletion.CASCADE, to='major.ChapterTask', verbose_name='任务id')),
                ('user', models.ForeignKey(help_text='用户名', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户名')),
            ],
            options={
                'verbose_name': '用户任务',
                'verbose_name_plural': '用户任务',
            },
        ),
        migrations.CreateModel(
            name='UserPractice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('types', models.IntegerField(help_text='类别', verbose_name='类别')),
                ('end_time', models.DateTimeField(default=django.utils.timezone.now, help_text='结束时间', verbose_name='结束时间')),
                ('practice_info', models.TextField(default='', help_text='练习题提交答案', verbose_name='练习内容')),
                ('count', models.IntegerField(default=0, help_text='作业提交次数', verbose_name='作业提交次数')),
                ('chapter', models.ForeignKey(help_text='章节id', on_delete=django.db.models.deletion.CASCADE, to='major.Chapter', verbose_name='章节名')),
                ('practice', models.ForeignKey(help_text='练习题id', on_delete=django.db.models.deletion.CASCADE, to='major.Practice', verbose_name='练习名')),
                ('user', models.ForeignKey(help_text='用户id', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='学生名')),
            ],
            options={
                'verbose_name': '学生练习信息',
                'verbose_name_plural': '学生练习信息',
            },
        ),
        migrations.CreateModel(
            name='UserTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(help_text='作业名字', max_length=255, verbose_name='作业名字')),
                ('download', models.FileField(blank=True, help_text='作业下载地址', null=True, upload_to='task/%Y/%m/%d/', verbose_name='作业下载地址')),
                ('complete_time', models.DateTimeField(default=django.utils.timezone.now, help_text='提交时间', verbose_name='提交时间')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户名')),
            ],
            options={
                'verbose_name': '学生作业',
                'verbose_name_plural': '学生作业',
            },
        ),
        migrations.AlterUniqueTogether(
            name='userchapter',
            unique_together=set([('user', 'chapter')]),
        ),
    ]
Exemplo n.º 24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='News',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='标题')),
                ('author',
                 models.CharField(default='佚名',
                                  max_length=255,
                                  verbose_name='作者')),
                ('pub_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='最后修改时间')),
                ('content',
                 DjangoUeditor.models.UEditorField(
                     error_messages={'null': '不能为空.'}, verbose_name='新闻内容')),
                ('word_num',
                 models.IntegerField(blank=True, null=True,
                                     verbose_name='字数')),
                ('browse_num',
                 models.IntegerField(blank=True, null=True,
                                     verbose_name='浏览数')),
                ('status', models.BooleanField(default=True,
                                               verbose_name='状态')),
                ('sort',
                 models.IntegerField(blank=True,
                                     null=True,
                                     unique=True,
                                     verbose_name='排序')),
                ('level',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='level')),
                ('description',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='描述')),
                ('file',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to='',
                                  verbose_name='附件')),
                ('cover_pic',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='',
                                   verbose_name='封面图片')),
                ('backup',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='预留')),
            ],
            options={
                'verbose_name_plural': '新闻',
                'db_table': 'news_info',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='NewsCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255,
                                          verbose_name='新闻分类')),
                ('pub_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('update_time',
                 models.DateTimeField(auto_now=True, verbose_name='最后修改时间')),
                ('cover_pic',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='',
                                   verbose_name='封面图片')),
                ('note',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='备注')),
                ('status', models.BooleanField(default=True,
                                               verbose_name='状态')),
                ('sort',
                 models.IntegerField(blank=True,
                                     null=True,
                                     unique=True,
                                     verbose_name='排序')),
                ('backup',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='预留')),
            ],
            options={
                'verbose_name_plural': '新闻分类',
                'db_table': 'news_category',
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='news',
            name='news_category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='kinshow.NewsCategory'),
        ),
    ]
Exemplo n.º 25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organization', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='课程名')),
                ('desc', models.CharField(max_length=300,
                                          verbose_name='课程描述')),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   verbose_name='课程详情')),
                ('is_banner',
                 models.BooleanField(default=False, verbose_name='是否轮播')),
                ('degree',
                 models.CharField(choices=[('cj', '初级'), ('zj', '中级'),
                                           ('gj', '高级')],
                                  max_length=2,
                                  verbose_name='难度')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('students', models.IntegerField(default=0,
                                                 verbose_name='学习人数')),
                ('fav_nums', models.IntegerField(default=0,
                                                 verbose_name='收藏人数')),
                ('image',
                 models.ImageField(upload_to='courses/%Y/%m',
                                   verbose_name='封面图')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='点击数')),
                ('category',
                 models.CharField(default='后端开发',
                                  max_length=20,
                                  verbose_name='课程类别')),
                ('tag',
                 models.CharField(default='',
                                  max_length=10,
                                  verbose_name='课程标签')),
                ('youneed_know',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='课程须知')),
                ('teacher_tell',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='老师告诉你')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('course_org',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='organization.CourseOrg',
                                   verbose_name='课程机构')),
                ('teacher',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='organization.Teacher',
                                   verbose_name='讲师')),
            ],
            options={
                'verbose_name': '课程',
                'verbose_name_plural': '课程',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('download',
                 models.FileField(upload_to='course/resource/%Y/%m',
                                  verbose_name='资源文件')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '课程资源',
                'verbose_name_plural': '课程资源',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='章节名')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='课程')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='视频名')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='学习时长(分钟数)')),
                ('url',
                 models.CharField(default='',
                                  max_length=200,
                                  verbose_name='访问地址')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='章节')),
            ],
            options={
                'verbose_name': '视频',
                'verbose_name_plural': '视频',
            },
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[],
            options={
                'verbose_name': '轮播课程',
                'verbose_name_plural': '轮播课程',
                'proxy': True,
                'indexes': [],
            },
            bases=('courses.course', ),
        ),
    ]
Exemplo n.º 26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='标题')),
                ('describe',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='描述')),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   verbose_name='课程内容')),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='blog/%Y%m',
                                   verbose_name='图片')),
                ('related',
                 models.CharField(blank=True,
                                  max_length=20,
                                  verbose_name='相关博客')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='点击数')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'verbose_name': '博客',
                'verbose_name_plural': '博客',
                'ordering': ['-add_time'],
            },
        ),
        migrations.CreateModel(
            name='BlogType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='类型')),
                ('add_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '博客类型',
                'verbose_name_plural': '博客类型',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='资源名')),
                ('download',
                 models.FileField(upload_to='blog/resource/%Y%m',
                                  verbose_name='资源文件')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='article.Blog',
                                   verbose_name='博客')),
            ],
            options={
                'verbose_name': '博客资源',
                'verbose_name_plural': '博客资源',
            },
        ),
        migrations.AddField(
            model_name='blog',
            name='blog_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='article.BlogType',
                verbose_name='博客类型'),
        ),
    ]
Exemplo n.º 27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('school', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('index',
                 models.IntegerField(default=1,
                                     verbose_name='\u7ae0\u8282\u53f7')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='\u7ae0\u8282\u540d\u79f0')),
                ('add_time',
                 models.DateTimeField(
                     default=datetime.datetime.now,
                     verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
            ],
            options={
                'verbose_name': '\u7ae0\u8282',
                'verbose_name_plural': '\u7ae0\u8282',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='\u8bfe\u7a0b\u540d')),
                ('category',
                 models.CharField(choices=[('co', '\u516c\u9009\u8bfe'),
                                           ('li', '\u9650\u9009\u8bfe')],
                                  default='co',
                                  max_length=2,
                                  verbose_name='\u8bfe\u7a0b\u7c7b\u522b')),
                ('tag',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='\u8bfe\u7a0b\u6807\u7b7e')),
                ('is_banner',
                 models.BooleanField(default=False,
                                     verbose_name='\u662f\u5426\u8f6e\u64ad')),
                ('desc',
                 models.CharField(max_length=300,
                                  verbose_name='\u8bfe\u7a0b\u63cf\u8ff0')),
                ('detail',
                 DjangoUeditor.models.UEditorField(
                     default='', verbose_name='\u8bfe\u7a0b\u8be6\u60c5')),
                ('degree',
                 models.CharField(choices=[('ju', '\u521d\u7ea7'),
                                           ('mi', '\u4e2d\u7ea7'),
                                           ('hi', '\u9ad8\u7ea7')],
                                  default='ju',
                                  max_length=2,
                                  verbose_name='\u96be\u5ea6')),
                ('learn_times',
                 models.IntegerField(default=0,
                                     verbose_name='\u5b66\u4e60\u65f6\u957f')),
                ('image',
                 models.ImageField(default='course/default.png',
                                   upload_to='course/%Y/%m',
                                   verbose_name='\u5c01\u9762\u56fe')),
                ('need_know',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='\u8bfe\u7a0b\u987b\u77e5')),
                ('teacher_tell',
                 models.CharField(
                     default='',
                     max_length=300,
                     verbose_name='\u6559\u5e08\u544a\u8bc9\u4f60')),
                ('learn_nums',
                 models.IntegerField(default=0,
                                     verbose_name='\u5b66\u4e60\u4eba\u6570')),
                ('fav_nums',
                 models.IntegerField(default=0,
                                     verbose_name='\u6536\u85cf\u4eba\u6570')),
                ('click_nums',
                 models.IntegerField(default=0,
                                     verbose_name='\u70b9\u51fb\u6570')),
                ('add_time',
                 models.DateTimeField(
                     default=datetime.datetime.now,
                     verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('school',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='school.School',
                                   verbose_name='\u8bfe\u7a0b\u9662\u7cfb')),
                ('teacher',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='school.Teacher',
                                   verbose_name='\u6559\u5e08')),
            ],
            options={
                'verbose_name': '\u8bfe\u7a0b',
                'verbose_name_plural': '\u8bfe\u7a0b',
            },
        ),
        migrations.CreateModel(
            name='CourseNote',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('note',
                 models.TextField(default='',
                                  verbose_name='\u8bfe\u7a0b\u516c\u544a')),
                ('add_time',
                 models.DateTimeField(
                     default=datetime.datetime.now,
                     verbose_name='\u53d1\u5e03\u65f6\u95f4')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Course',
                                   verbose_name='\u8bfe\u7a0b')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='school.Teacher',
                                   verbose_name='\u6559\u5e08')),
            ],
            options={
                'verbose_name': '\u8bfe\u7a0b\u516c\u544a',
                'verbose_name_plural': '\u8bfe\u7a0b\u516c\u544a',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='\u6587\u4ef6\u540d')),
                ('download',
                 models.FileField(upload_to='course/resource/%Y/%m',
                                  verbose_name='\u8d44\u6e90\u6587\u4ef6')),
                ('add_time',
                 models.DateTimeField(
                     default=datetime.datetime.now,
                     verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Course',
                                   verbose_name='\u8bfe\u7a0b')),
            ],
            options={
                'verbose_name': '\u8bfe\u7a0b\u8d44\u6e90',
                'verbose_name_plural': '\u8bfe\u7a0b\u8d44\u6e90',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('index',
                 models.IntegerField(default=1,
                                     verbose_name='\u8bfe\u65f6\u5e8f\u53f7')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='\u8bfe\u65f6\u540d\u79f0')),
                ('url',
                 models.CharField(default='',
                                  max_length=200,
                                  verbose_name='\u89c6\u9891\u94fe\u63a5')),
                ('video',
                 models.FileField(default='',
                                  max_length=300,
                                  upload_to='course/video/%Y/%m',
                                  verbose_name='\u89c6\u9891\u6587\u4ef6')),
                ('time',
                 models.IntegerField(default=0,
                                     verbose_name='\u89c6\u9891\u65f6\u957f')),
                ('add_time',
                 models.DateTimeField(
                     default=datetime.datetime.now,
                     verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('chapter',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='course.Chapter',
                                   verbose_name='\u7ae0\u8282')),
            ],
            options={
                'verbose_name': '\u8bfe\u65f6',
                'verbose_name_plural': '\u8bfe\u65f6',
            },
        ),
        migrations.AddField(
            model_name='chapter',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='course.Course',
                verbose_name='\u8bfe\u7a0b'),
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[],
            options={
                'verbose_name': '\u8f6e\u64ad\u8bfe\u7a0b',
                'proxy': True,
                'verbose_name_plural': '\u8f6e\u64ad\u8bfe\u7a0b',
            },
            bases=('course.course', ),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organizations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='added time')),
                ('name',
                 models.CharField(max_length=50, verbose_name='course name')),
                ('desc',
                 models.CharField(max_length=300,
                                  verbose_name='course description')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='length(mins)')),
                ('degree',
                 models.CharField(choices=[('low', 'entry level'),
                                           ('mid', 'intermediated'),
                                           ('high', 'advanced')],
                                  max_length=20,
                                  verbose_name='difficulty')),
                ('students',
                 models.IntegerField(default=0,
                                     verbose_name='students number')),
                ('fav_nums',
                 models.IntegerField(default=0,
                                     verbose_name='favorite number')),
                ('click_nums',
                 models.IntegerField(default=0, verbose_name='clicks')),
                ('notice',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='notice')),
                ('category',
                 models.CharField(default='General Course',
                                  max_length=20,
                                  verbose_name='course category')),
                ('tag',
                 models.CharField(default='',
                                  max_length=10,
                                  verbose_name='course tag')),
                ('youneed_know',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='course requirements')),
                ('teacher_tell',
                 models.CharField(default='',
                                  max_length=300,
                                  verbose_name='instructor notices')),
                ('is_classics',
                 models.BooleanField(default=False,
                                     verbose_name='is recommanded')),
                ('detail',
                 DjangoUeditor.models.UEditorField(
                     default='', verbose_name='course details')),
                ('is_banner',
                 models.BooleanField(default=False,
                                     verbose_name='is AD. banner')),
                ('image',
                 models.ImageField(upload_to='courses/%Y/%m',
                                   verbose_name='course image')),
                ('course_org',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='organizations.CourseOrg',
                                   verbose_name='department')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='organizations.Teacher',
                                   verbose_name='instructor')),
            ],
            options={
                'verbose_name': 'Course Info',
                'verbose_name_plural': 'Course Info',
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='added time')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='chapter name')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='length(mins)')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='course')),
            ],
            options={
                'verbose_name': 'course chapter',
                'verbose_name_plural': 'course chapter',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='added time')),
                ('name',
                 models.CharField(max_length=100, verbose_name='vide name')),
                ('learn_times',
                 models.IntegerField(default=0, verbose_name='length(mins)')),
                ('url',
                 models.CharField(max_length=1000, verbose_name='video url')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Lesson',
                                   verbose_name='chapter')),
            ],
            options={
                'verbose_name': 'video',
                'verbose_name_plural': 'video',
            },
        ),
        migrations.CreateModel(
            name='CourseTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='added time')),
                ('tag',
                 models.CharField(max_length=100, verbose_name='course tag')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='course')),
            ],
            options={
                'verbose_name': 'course tag',
                'verbose_name_plural': 'course tag',
            },
        ),
        migrations.CreateModel(
            name='CourseResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='added time')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='course resource name')),
                ('file',
                 models.FileField(max_length=200,
                                  upload_to='course/resourse/%Y/%m',
                                  verbose_name='download path')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.Course',
                                   verbose_name='course')),
            ],
            options={
                'verbose_name': 'course resource',
                'verbose_name_plural': 'course resource',
            },
        ),
        migrations.CreateModel(
            name='BannerCourse',
            fields=[],
            options={
                'verbose_name': 'banner courses',
                'verbose_name_plural': 'banner courses',
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('courses.course', ),
        ),
    ]
Exemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('image', models.ImageField(upload_to='banner/%Y/%m/%d', verbose_name='图片')),
                ('url', models.URLField(verbose_name='跳转链接')),
                ('name', models.CharField(max_length=50, verbose_name='图片描述')),
            ],
            options={
                'verbose_name': '轮廓图',
                'verbose_name_plural': '轮廓图',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('name', models.CharField(max_length=10, verbose_name='类名')),
            ],
            options={
                'verbose_name': '分类',
                'verbose_name_plural': '分类',
            },
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('name', models.CharField(max_length=10, verbose_name='公司名称')),
                ('conpany_info', models.CharField(max_length=255, verbose_name='公司介绍')),
                ('video', models.FileField(upload_to='video/%Y/%m/%d', verbose_name='视屏')),
            ],
            options={
                'verbose_name': '公司简介',
                'verbose_name_plural': '公司简介',
            },
        ),
        migrations.CreateModel(
            name='Dbz_nav',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('name', models.CharField(max_length=8, verbose_name='导航名字')),
            ],
            options={
                'verbose_name': '导航',
                'verbose_name_plural': '导航',
            },
        ),
        migrations.CreateModel(
            name='Join_hands',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('company_info', models.CharField(max_length=255, verbose_name='公司简介')),
                ('company_logo', models.ImageField(upload_to='logo/%Y/%m/%d', verbose_name='公司图片')),
            ],
            options={
                'verbose_name': '合作伙伴',
                'verbose_name_plural': '合作伙伴',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('cover', models.ImageField(upload_to='news/%Y/%m/%d', verbose_name='封面')),
                ('news_info', models.CharField(max_length=50, verbose_name='文章简介')),
                ('content', DjangoUeditor.models.UEditorField()),
                ('name', models.CharField(max_length=25, verbose_name='文章名字')),
                ('browse', models.IntegerField(default=0, verbose_name='浏览量')),
            ],
            options={
                'verbose_name': '新闻',
                'verbose_name_plural': '新闻',
            },
        ),
        migrations.CreateModel(
            name='NewsClassfly',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('name', models.CharField(max_length=10, verbose_name='新闻分类')),
            ],
            options={
                'verbose_name': '新闻分类',
                'verbose_name_plural': '新闻分类',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('cover', models.ImageField(upload_to='product/%Y/%m/%d', verbose_name='产品样式')),
                ('name', models.CharField(max_length=20, verbose_name='产品名字')),
                ('sub_title', models.CharField(max_length=30, verbose_name='副标题')),
            ],
            options={
                'verbose_name': '产品',
                'verbose_name_plural': '产品',
            },
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField(default=0, verbose_name='位置')),
                ('is_show', models.BooleanField(default=True, verbose_name='是否显示')),
                ('is_top', models.BooleanField(default=False, verbose_name='是否置顶')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='跟新时间')),
                ('phont', models.ImageField(upload_to='phont/%Y/%m/%d', verbose_name='员工头像')),
                ('job', models.CharField(max_length=10, verbose_name='职位')),
                ('phone', models.CharField(max_length=11, verbose_name='手机号')),
                ('email', models.CharField(max_length=20, verbose_name='邮箱')),
                ('name', models.CharField(max_length=20, verbose_name='名字')),
                ('address', models.CharField(max_length=50, verbose_name='地址')),
            ],
            options={
                'verbose_name': '客户表',
                'verbose_name_plural': '客户表',
            },
        ),
        migrations.AddField(
            model_name='news',
            name='classfly',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.NewsClassfly'),
        ),
        migrations.AddField(
            model_name='category',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.Product'),
        ),
    ]
Exemplo n.º 30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('orgs', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CourseInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='课程名称')),
                ('image',
                 models.ImageField(max_length=200,
                                   upload_to='courses/%y/%m/%d',
                                   verbose_name='课程封面')),
                ('study_time',
                 models.IntegerField(default=0, verbose_name='学习时长')),
                ('love_num', models.IntegerField(default=0,
                                                 verbose_name='收藏人数')),
                ('desc', models.CharField(max_length=300,
                                          verbose_name='课程简介')),
                ('detail',
                 DjangoUeditor.models.UEditorField(default='',
                                                   verbose_name='课程详情')),
                ('study_num',
                 models.IntegerField(default=0, verbose_name='学习人数')),
                ('comment_num',
                 models.IntegerField(default=0, verbose_name='评论人数')),
                ('level',
                 models.CharField(choices=[('初级', '初级'), ('中级', '中级'),
                                           ('高级', '高级')],
                                  default='高级',
                                  max_length=10,
                                  verbose_name='课程难度')),
                ('course_category',
                 models.CharField(choices=[('前端开发', '前端开发'), ('后端开发', '后端开发')],
                                  default='后端开发',
                                  max_length=15,
                                  verbose_name='课程类别')),
                ('click_num', models.IntegerField(default=0,
                                                  verbose_name='访问量')),
                ('course_bull',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='课程公告')),
                ('teacher_tell',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='讲师提示')),
                ('need_known',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='课程须知')),
                ('is_banner',
                 models.BooleanField(default=False, verbose_name='是否轮播')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('org',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='orgs.OrgInfo',
                                   verbose_name='所属机构')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='orgs.TeacherInfo',
                                   verbose_name='所属教师')),
            ],
            options={
                'verbose_name': '课程信息',
                'verbose_name_plural': '课程信息',
                'db_table': 'edu_courses',
                'ordering': ['-add_time'],
            },
        ),
        migrations.CreateModel(
            name='LessonInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='章节名称')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.CourseInfo',
                                   verbose_name='所属课程')),
            ],
            options={
                'verbose_name': '章节信息',
                'verbose_name_plural': '章节信息',
                'db_table': 'edu_lessons',
            },
        ),
        migrations.CreateModel(
            name='VideoInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='视频名称')),
                ('study_time',
                 models.IntegerField(default=0, verbose_name='学习时长')),
                ('url',
                 models.FileField(upload_to='courses/%y/%m/%d',
                                  verbose_name='视频链接')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.LessonInfo',
                                   verbose_name='所属章节')),
            ],
            options={
                'verbose_name': '视频信息',
                'verbose_name_plural': '视频信息',
                'db_table': 'edu_videos',
            },
        ),
        migrations.CreateModel(
            name='SourceInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='资料名称')),
                ('download',
                 models.FileField(max_length=200,
                                  upload_to='sources/%y/%m/%d',
                                  verbose_name='资料下载')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='courses.CourseInfo',
                                   verbose_name='所属课程')),
            ],
            options={
                'verbose_name': '资源信息',
                'verbose_name_plural': '资源信息',
                'db_table': 'edu_sources',
            },
        ),
    ]