from flask_wtf import FlaskForm
from wtforms import StringField, FloatField, DateField, SelectField, SubmitField
from wtforms.validators import DataRequired

class VehicleForm(FlaskForm):
    license_plate = StringField('License Plate', validators=[DataRequired()])
    model = StringField('Model', validators=[DataRequired()])
    submit = SubmitField('Submit')

class RepostajeForm(FlaskForm):
    vehicle_id = SelectField('Vehicle', coerce=int, validators=[DataRequired()])
    amount = FloatField('Amount', validators=[DataRequired()])
    date = DateField('Date', format='%Y-%m-%d', validators=[DataRequired()])
    kilometers = FloatField('Kilometers', validators=[DataRequired()])
    liters = FloatField('Liters', validators=[DataRequired()])
    total_amount = FloatField('Total Amount', validators=[DataRequired()])
    submit = SubmitField('Submit')
