# Generated by Django 4.2.23 on 2025-06-14 11:29

import django.contrib.postgres.indexes
from django.db import migrations, models


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='API',
            fields=[
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('method', models.CharField(default='GET', max_length=18, verbose_name='Method')),
                ('api', models.CharField(max_length=255, verbose_name='API API')),
                ('func_name', models.CharField(max_length=255, verbose_name='API Name')),
                ('name', models.CharField(default='', max_length=255, verbose_name='API Description')),
            ],
            options={
                'verbose_name': 'bomiot API',
                'verbose_name_plural': 'bomiot API',
                'db_table': 'bomiot_api',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='ASN',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot ASN',
                'verbose_name_plural': 'bomiot ASN',
                'db_table': 'bomiot_asn',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Bar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Bar',
                'verbose_name_plural': 'bomiot Bar',
                'db_table': 'bomiot_bar',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Bin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Bin',
                'verbose_name_plural': 'bomiot Bin',
                'db_table': 'bomiot_bin',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Capital',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Capital',
                'verbose_name_plural': 'bomiot Capital',
                'db_table': 'bomiot_capital',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='CPU',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('cpu_usage', models.FloatField(default=0, verbose_name='CPU Usage')),
                ('physical_cores', models.IntegerField(default=0, verbose_name='Physical Cores')),
                ('logical_cores', models.IntegerField(default=0, verbose_name='Logical Cores')),
                ('cpu_frequency', models.CharField(default='', max_length=255, verbose_name='CPU Frequency')),
                ('min_cpu_frequency', models.CharField(default='', max_length=255, verbose_name='Min CPU Frequency')),
                ('max_cpu_frequency', models.CharField(default='', max_length=255, verbose_name='Max CPU Frequency')),
            ],
            options={
                'verbose_name': 'bomiot CPU',
                'verbose_name_plural': 'bomiot CPU',
                'db_table': 'bomiot_cpu',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Customer',
                'verbose_name_plural': 'bomiot Customer',
                'db_table': 'bomiot_customer',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('name', models.CharField(default='', max_length=255, verbose_name='Department Name')),
            ],
            options={
                'verbose_name': 'bomiot Department',
                'verbose_name_plural': 'bomiot Department',
                'db_table': 'bomiot_department',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Disk',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('device', models.CharField(default='', max_length=255, verbose_name='Device')),
                ('mountpoint', models.CharField(default='', max_length=255, verbose_name='Mountpoint')),
                ('total', models.IntegerField(default=0, verbose_name='Total')),
                ('used', models.IntegerField(default=0, verbose_name='Used')),
                ('free', models.IntegerField(default=0, verbose_name='Free')),
                ('percent', models.FloatField(default=0, verbose_name='Percent')),
            ],
            options={
                'verbose_name': 'bomiot Disk',
                'verbose_name_plural': 'bomiot Disk',
                'db_table': 'bomiot_disk',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='DN',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot DN',
                'verbose_name_plural': 'bomiot DN',
                'db_table': 'bomiot_dn',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Driver',
                'verbose_name_plural': 'bomiot Driver',
                'db_table': 'bomiot_driver',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Example',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Example',
                'verbose_name_plural': 'bomiot Example',
                'db_table': 'bomiot_example',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Fee',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Fee',
                'verbose_name_plural': 'bomiot Fee',
                'db_table': 'bomiot_fee',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Goods',
                'verbose_name_plural': 'bomiot Goods',
                'db_table': 'bomiot_goods',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Memory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('total', models.IntegerField(default=0, verbose_name='Total Memory')),
                ('used', models.IntegerField(default=0, verbose_name='Used Memory')),
                ('free', models.IntegerField(default=0, verbose_name='Free Memory')),
                ('percent', models.FloatField(default=0, verbose_name='Percent')),
                ('swap_total', models.IntegerField(default=0, verbose_name='Swap Total Memory')),
                ('swap_used', models.IntegerField(default=0, verbose_name='Swap Used Memory')),
                ('swap_free', models.IntegerField(default=0, verbose_name='Swap Free Memory')),
                ('swap_percent', models.FloatField(default=0, verbose_name='Swap Percent')),
            ],
            options={
                'verbose_name': 'bomiot Memory',
                'verbose_name_plural': 'bomiot Memory',
                'db_table': 'bomiot_memory',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Network',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('bytes_sent', models.IntegerField(default=0, verbose_name='Bytes Sent')),
                ('bytes_recv', models.IntegerField(default=0, verbose_name='Bytes Received')),
            ],
            options={
                'verbose_name': 'bomiot Network',
                'verbose_name_plural': 'bomiot Network',
                'db_table': 'bomiot_network',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Pids',
            fields=[
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('pid', models.IntegerField(editable=False, primary_key=True, serialize=False, verbose_name='PID')),
                ('name', models.CharField(blank=True, default='', max_length=255, verbose_name='PID Name')),
                ('memory', models.IntegerField(default=0, verbose_name='Memory')),
                ('create_time', models.DateTimeField(blank=True, verbose_name='Create Time')),
                ('memory_usage', models.FloatField(default=0, verbose_name='Memory Usage')),
                ('cpu_usage', models.FloatField(default=0, verbose_name='CPU Usage')),
            ],
            options={
                'verbose_name': 'bomiot Pids',
                'verbose_name_plural': 'bomiot Pids',
                'db_table': 'bomiot_pids',
                'ordering': ['-cpu_usage'],
            },
        ),
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Purchase',
                'verbose_name_plural': 'bomiot Purchase',
                'db_table': 'bomiot_purchase',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='PyPi',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('category', models.CharField(max_length=255, verbose_name='Category')),
                ('date', models.DateTimeField(blank=True, verbose_name='PyPi Date')),
                ('percent', models.FloatField(default=0, verbose_name='Percent')),
                ('downloads', models.IntegerField(default=0, verbose_name='Downloads')),
            ],
            options={
                'verbose_name': 'bomiot PyPi',
                'verbose_name_plural': 'bomiot PyPi',
                'db_table': 'bomiot_pypi',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Stock',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Stock',
                'verbose_name_plural': 'bomiot Stock',
                'db_table': 'bomiot_stock',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('data', models.JSONField()),
            ],
            options={
                'verbose_name': 'bomiot Supplier',
                'verbose_name_plural': 'bomiot Supplier',
                'db_table': 'bomiot_supplier',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_delete', models.BooleanField(default=False, verbose_name='Delete Label')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='Created Time')),
                ('updated_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time')),
                ('name', models.CharField(default='', max_length=255, verbose_name='Team Name')),
                ('permission', models.JSONField(default=dict, null=True, verbose_name='Permission')),
            ],
            options={
                'verbose_name': 'bomiot Team',
                'verbose_name_plural': 'bomiot Team',
                'db_table': 'bomiot_team',
                'ordering': ['-id'],
            },
        ),
        migrations.RemoveField(
            model_name='user',
            name='appid',
        ),
        migrations.RemoveField(
            model_name='user',
            name='approve_level',
        ),
        migrations.RemoveField(
            model_name='user',
            name='openid',
        ),
        migrations.AddField(
            model_name='user',
            name='department',
            field=models.IntegerField(blank=True, default=0, verbose_name='Department'),
        ),
        migrations.AddField(
            model_name='user',
            name='team',
            field=models.IntegerField(blank=True, default=0, verbose_name='Team'),
        ),
        migrations.AlterField(
            model_name='files',
            name='created_time',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created Time'),
        ),
        migrations.AlterField(
            model_name='files',
            name='updated_time',
            field=models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time'),
        ),
        migrations.AlterField(
            model_name='joblist',
            name='created_time',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created Time'),
        ),
        migrations.AlterField(
            model_name='joblist',
            name='updated_time',
            field=models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time'),
        ),
        migrations.AlterField(
            model_name='message',
            name='created_time',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created Time'),
        ),
        migrations.AlterField(
            model_name='message',
            name='updated_time',
            field=models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time'),
        ),
        migrations.AlterField(
            model_name='permission',
            name='created_time',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created Time'),
        ),
        migrations.AlterField(
            model_name='permission',
            name='updated_time',
            field=models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time'),
        ),
        migrations.AlterField(
            model_name='throttlemodel',
            name='created_time',
            field=models.DateTimeField(auto_now_add=True, verbose_name='Created Time'),
        ),
        migrations.AlterField(
            model_name='throttlemodel',
            name='updated_time',
            field=models.DateTimeField(auto_now=True, null=True, verbose_name='Updated Time'),
        ),
        migrations.AddIndex(
            model_name='user',
            index=django.contrib.postgres.indexes.GinIndex(fields=['permission'], name='user_permission_gin_index'),
        ),
        migrations.AddIndex(
            model_name='team',
            index=django.contrib.postgres.indexes.GinIndex(fields=['permission'], name='team_permission_gin_index'),
        ),
        migrations.AddIndex(
            model_name='supplier',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='supplier_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='stock',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='stock_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='purchase',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='purchase_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='goods',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='goods_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='fee',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='fee_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='example',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='example_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='driver',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='driver_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='dn',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='dn_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='customer',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='customer_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='capital',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='capital_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='bin',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='bin_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='bar',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='bar_data_gin_index'),
        ),
        migrations.AddIndex(
            model_name='asn',
            index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='asn_data_gin_index'),
        ),
    ]
