# Generated by Django 5.0.6 on 2024-05-28 10:01 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('cname', models.CharField(max_length=30, unique=True, verbose_name='类别名称')), ], options={ 'verbose_name_plural': '类别', 'db_table': 't_category', }, ), migrations.CreateModel( name='Tag', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('tname', models.CharField(max_length=30, unique=True, verbose_name='标签名称')), ], options={ 'verbose_name_plural': '标签', 'db_table': 't_tag', }, ), migrations.CreateModel( name='Post', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100, unique=True)), ('desc', models.CharField(max_length=100)), ('content', models.TextField()), ('created', models.DateTimeField(auto_now_add=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='post.category')), ('tag', models.ManyToManyField(to='post.tag')), ], options={ 'verbose_name_plural': '帖子', 'db_table': 't_post', }, ), ]