from django import forms
from .models import Document, Client, Portfolio, Activity

class DocumentForm(forms.ModelForm):
    class Meta:
        model = Document
        fields = ('client', 'title', 'description', 'file')
        widgets = {
            'client': forms.Select(attrs={'class': 'form-control'}),
            'title': forms.TextInput(attrs={'class': 'form-control'}),
            'description': forms.Textarea(attrs={'class': 'form-control', 'rows': 3}),
            'file': forms.FileInput(attrs={'class': 'form-control'}),
        }


class ClientForm(forms.ModelForm):
    class Meta:
        model = Client
        fields = ('name', 'email', 'phone', 'address')


class PortfolioForm(forms.ModelForm):
    class Meta:
        model = Portfolio
        fields = ('client', 'name', 'description')


class ActivityForm(forms.ModelForm):
    class Meta:
        model = Activity
        fields = ('client', 'title', 'description', 'status', 'activity_date')
