# Generated by Django 5.1.5 on 2025-02-09 10:40

import access.fields
import access.models
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('core', '0011_ticket_parent_ticket'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ModelNotes',
            fields=[
                ('is_global', models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object')),
                ('model_notes', models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes')),
                ('id', models.AutoField(help_text='ID of this note', primary_key=True, serialize=False, unique=True, verbose_name='ID')),
                ('content', models.TextField(help_text='The tid bit you wish to add', verbose_name='Note')),
                ('created', access.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of creation', verbose_name='Created')),
                ('modified', access.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of last modification', verbose_name='Modified')),
                ('content_type', models.ForeignKey(blank=True, help_text='Model this note is for', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype', verbose_name='Content Model')),
                ('created_by', models.ForeignKey(blank=True, help_text='User whom added the Note', on_delete=django.db.models.deletion.DO_NOTHING, related_name='created_notes', to=settings.AUTH_USER_MODEL, verbose_name='Created By')),
                ('modified_by', models.ForeignKey(blank=True, default=None, help_text='User whom modified the note', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='modified_notes', to=settings.AUTH_USER_MODEL, verbose_name='Edited By')),
                ('organization', models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization')),
            ],
            options={
                'verbose_name': 'Model Note',
                'verbose_name_plural': 'Model Notes',
                'db_table': 'core_model_notes',
                'ordering': ['-created'],
            },
        ),
    ]
