# Generated by Django 6.0.4 on 2026-06-20 07:42

import apps.projects.models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('projects', '0008_projectfund_project_fun_status_07e912_idx'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ProjectResource',
            fields=[
                ('id', models.UUIDField(default=apps.projects.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('kind', models.CharField(choices=[('data', 'Data'), ('literature', 'Literature')], max_length=20)),
                ('title', models.CharField(max_length=255)),
                ('link', models.URLField(blank=True, max_length=1000)),
                ('detail', models.TextField(blank=True)),
                ('source', models.CharField(blank=True, max_length=255)),
                ('authors', models.CharField(blank=True, max_length=500)),
                ('year', models.PositiveIntegerField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='project_resources', to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resources', to='projects.project')),
            ],
            options={
                'db_table': 'project_resources',
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['project', 'kind'], name='project_res_project_c98155_idx')],
            },
        ),
    ]
