# Generated by Django 6.0.1 on 2026-01-20 05:36

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('original_name', models.CharField(max_length=255, verbose_name='文件名')),
                ('storage_path', models.CharField(max_length=500, verbose_name='存储路径')),
                ('mime_type', models.CharField(max_length=100, verbose_name='文件类型')),
                ('size', models.BigIntegerField(help_text='单位：字节', verbose_name='文件大小')),
                ('owner_id', models.CharField(db_index=True, max_length=100, verbose_name='所有者ID')),
                ('is_public', models.BooleanField(db_index=True, default=False, help_text='公开文件可被任何人访问', verbose_name='公开访问')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '附件',
                'verbose_name_plural': '附件',
                'db_table': 'chewy_attachments',
                'ordering': ['-created_at'],
                'abstract': False,
                'swappable': 'CHEWY_ATTACHMENT_MODEL',
                'indexes': [models.Index(fields=['owner_id', 'created_at'], name='chewy_attac_owner_i_3a3cd8_idx')],
            },
        ),
    ]
