from dataclasses import dataclass, field
from decimal import Decimal
from typing import Optional

from mydata.models.generated.expenses_classification_category_type import (
    ExpensesClassificationCategory,
)
from mydata.models.generated.expenses_classification_value_type import (
    ExpensesClassificationValue,
)

__NAMESPACE__ = "https://www.aade.gr/myDATA/expensesClassificaton/v1.0"


@dataclass
class ExpensesClassification:
    """
    Attributes:
        classification_type: Κωδικός Χαρακτηρισμού
        classification_category: Κατηγορία Χαρακτηρισμού
        amount: Ποσό Χαρακτηρισμού
        vat_amount: Πόσο Φόρου
        vat_category: Κατηγορία ΦΠΑ
        vat_exemption_category: Κατηγορία Εξαίρεσης ΦΠΑ
        id: Μοναδικός Αριθμός Χαρακτηρισμού
    """

    class Meta:
        name = "ExpensesClassificationType"

    classification_type: Optional[ExpensesClassificationValue] = field(
        default=None,
        metadata={
            "name": "classificationType",
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
        },
    )
    classification_category: Optional[ExpensesClassificationCategory] = field(
        default=None,
        metadata={
            "name": "classificationCategory",
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
        },
    )
    amount: Optional[Decimal] = field(
        default=None,
        metadata={
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
            "required": True,
            "min_inclusive": Decimal("0"),
            "fraction_digits": 2,
        },
    )
    vat_amount: Optional[Decimal] = field(
        default=None,
        metadata={
            "name": "vatAmount",
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
            "min_inclusive": Decimal("0"),
            "fraction_digits": 2,
        },
    )
    vat_category: Optional[int] = field(
        default=None,
        metadata={
            "name": "vatCategory",
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
            "min_inclusive": 1,
            "max_inclusive": 8,
        },
    )
    vat_exemption_category: Optional[int] = field(
        default=None,
        metadata={
            "name": "vatExemptionCategory",
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
            "min_inclusive": 1,
            "max_inclusive": 31,
        },
    )
    id: Optional[int] = field(
        default=None,
        metadata={
            "type": "Element",
            "namespace": "https://www.aade.gr/myDATA/expensesClassificaton/v1.0",
        },
    )
