# Generated by Django 3.1.4 on 2023-01-10 08:15

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0320_pointslogdetails_product_id'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('system', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='操作名称')),
                ('title', models.CharField(blank=True, max_length=50, null=True, verbose_name='菜单面包屑显示的内容')),
                ('method', models.CharField(max_length=20, verbose_name='请求方式')),
                ('action', models.CharField(max_length=20, unique=True, verbose_name='执行操作')),
                ('hidden', models.BooleanField(default=False, verbose_name='隐藏')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
            ],
            options={
                'verbose_name': '执行操作',
                'verbose_name_plural': '执行操作',
            },
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.IntegerField(blank=True, null=True, verbose_name='实例ID')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='生成日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='生成时间')),
                ('changed_data', models.JSONField(blank=True, default=dict, null=True, verbose_name='数据修改')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('action', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='log_action', to='system.action', verbose_name='执行操作')),
                ('company', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='log_company', to='company.company', verbose_name='公司')),
                ('contenttype', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='log_contenttype', to='contenttypes.contenttype', verbose_name='对像/表名')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='log_user', to='company.company', verbose_name='操作人')),
            ],
            options={
                'verbose_name': '系统操作日志',
                'verbose_name_plural': '系统操作日志',
            },
        ),
        migrations.AlterUniqueTogether(
            name='permission',
            unique_together=None,
        ),
        migrations.RemoveField(
            model_name='permission',
            name='category',
        ),
        migrations.RemoveField(
            model_name='permission',
            name='pid',
        ),
        migrations.DeleteModel(
            name='PermCategory',
        ),
        migrations.DeleteModel(
            name='Permission',
        ),
    ]
