# Generated by Django 3.0.4 on 2020-03-31 23:05

import datetime
from typing import List

import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies: List = []

    operations = [
        migrations.CreateModel(
            name="Member",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="name")),
            ],
            options={
                "verbose_name": "Member",
                "verbose_name_plural": "Members",
                "ordering": ["-created"],
            },
        ),
        migrations.CreateModel(
            name="Partner",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                (
                    "number",
                    models.CharField(
                        db_index=True, max_length=10, unique=True, verbose_name="number"
                    ),
                ),
                (
                    "nif",
                    models.CharField(
                        blank=True, max_length=20, null=True, verbose_name="NIF"
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="name")),
                (
                    "phone",
                    models.CharField(
                        blank=True, max_length=20, null=True, verbose_name="phone"
                    ),
                ),
                ("email", models.EmailField(max_length=75, verbose_name="email")),
                (
                    "request_date",
                    models.DateField(
                        blank=True, null=True, verbose_name="request date"
                    ),
                ),
                (
                    "approval_date",
                    models.DateField(
                        blank=True, null=True, verbose_name="approval date"
                    ),
                ),
                (
                    "has_board_directors_charge",
                    models.BooleanField(
                        default=False, verbose_name="has board directors charge"
                    ),
                ),
                (
                    "charge",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("president", "President"),
                            ("vicepresident", "Vice president"),
                            ("secretary", "Secretary"),
                            ("treasurer", "Treasurer"),
                            ("vocal", "Vocal"),
                        ],
                        max_length=16,
                        null=True,
                        verbose_name="charge",
                    ),
                ),
                (
                    "is_founder",
                    models.BooleanField(default=False, verbose_name="is founder"),
                ),
                (
                    "is_active",
                    models.BooleanField(default=True, verbose_name="is active"),
                ),
                (
                    "comment",
                    models.TextField(blank=True, null=True, verbose_name="comment"),
                ),
                (
                    "bank_account",
                    models.CharField(
                        blank=True,
                        max_length=30,
                        null=True,
                        verbose_name="bank account",
                    ),
                ),
            ],
            options={
                "verbose_name": "Partner",
                "verbose_name_plural": "Partners",
                "ordering": ["-number"],
            },
        ),
        migrations.CreateModel(
            name="Notice",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                (
                    "date",
                    models.DateField(
                        blank=True,
                        default=datetime.datetime.today,
                        null=True,
                        verbose_name="date",
                    ),
                ),
                (
                    "comment",
                    models.TextField(blank=True, null=True, verbose_name="comment"),
                ),
                (
                    "partner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="notices",
                        to="partners.Partner",
                        verbose_name="partner",
                    ),
                ),
            ],
            options={"verbose_name": "Notice", "verbose_name_plural": "Notices"},
        ),
        migrations.CreateModel(
            name="Fee",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("date", models.DateField(blank=True, null=True, verbose_name="date")),
                (
                    "payment_method",
                    models.CharField(
                        choices=[
                            ("wire_transfer", "Wire transfer"),
                            ("direct_debit", "Direct debit"),
                        ],
                        default="wire_transfer",
                        max_length=16,
                        verbose_name="payment method",
                    ),
                ),
                (
                    "amount",
                    models.DecimalField(
                        decimal_places=2,
                        default="30.00",
                        max_digits=5,
                        verbose_name="amount",
                    ),
                ),
                (
                    "partner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="fees",
                        to="partners.Partner",
                        verbose_name="partner",
                    ),
                ),
            ],
            options={
                "verbose_name": "Fee",
                "verbose_name_plural": "Fees",
                "ordering": ["-date"],
            },
        ),
    ]
