from django import forms
from django.contrib.auth.forms import UserCreationForm
from .models import Company, Tender, Bid, Document, Note, Approval

class SignUpForm(UserCreationForm):
    class Meta(UserCreationForm.Meta):
        fields = UserCreationForm.Meta.fields + ('email', 'first_name', 'last_name',)

class CompanyForm(forms.ModelForm):
    class Meta:
        model = Company
        fields = ['name']

class TenderForm(forms.ModelForm):
    class Meta:
        model = Tender
        fields = ['title', 'description', 'deadline']

class BidForm(forms.ModelForm):
    class Meta:
        model = Bid
        fields = ['amount']

class DocumentForm(forms.ModelForm):
    class Meta:
        model = Document
        fields = ['file', 'description']

class NoteForm(forms.ModelForm):
    class Meta:
        model = Note
        fields = ['note']

class ApprovalForm(forms.ModelForm):
    class Meta:
        model = Approval
        fields = ['status', 'comments']
