# Copyright 2026 EcoFuture Technology Services LLC and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by Django 5.0.1 on 2024-05-25 16:17

import uuid

import django.db.models.deletion
from django.db import migrations, models

import model_clone.mixin


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ChildEntity',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('child_name', models.CharField(max_length=255)),
                ('child_description', models.TextField(blank=True, null=True)),
                ('child_is_active', models.BooleanField(default=True)),
                ('child_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('child_dt_approved', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Child entity',
                'verbose_name_plural': 'Child entities',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='ParentEntity',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('dt_approved', models.DateTimeField(blank=True, null=True)),
                ('child_entities', models.ManyToManyField(blank=True, related_name='parent_entities', to='entity.childentity')),
            ],
            options={
                'verbose_name': 'Parent entity',
                'verbose_name_plural': 'Parent entities',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='ExtendedEntity',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('extended_name', models.CharField(max_length=255)),
                ('extended_description', models.TextField(blank=True, null=True)),
                ('extended_is_active', models.BooleanField(default=True)),
                ('extended_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('extended_dt_approved', models.DateTimeField(blank=True, null=True)),
                ('parent_entity', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='extended_entity', to='entity.parententity')),
            ],
            options={
                'verbose_name': 'Extended entity',
                'verbose_name_plural': 'Extended entities',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
        migrations.CreateModel(
            name='DependentEntity',
            fields=[
                ('dt_created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Creation time')),
                ('dt_updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Update time')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('dependent_name', models.CharField(max_length=255)),
                ('dependent_description', models.TextField(blank=True, null=True)),
                ('dependent_is_active', models.BooleanField(default=True)),
                ('dependent_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('dependent_dt_approved', models.DateTimeField(blank=True, null=True)),
                ('parent_entity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dependent_entities', to='entity.parententity')),
            ],
            options={
                'verbose_name': 'Dependent entity',
                'verbose_name_plural': 'Dependent entities',
                'abstract': False,
            },
            bases=(model_clone.mixin.CloneMixin, models.Model),
        ),
    ]
