from django.db import models
from accounts.models import User
# Create your models here.

class DriverPartners(models.Model):
    id : models.AutoField(primary_key=True)
    user = models.ForeignKey(User, default="", null=False, blank=False, on_delete=models.CASCADE, related_name="driver_partner")
    gender_types = ((0, 'Male'),(1, 'Female'))
    gender = models.IntegerField(default=0, choices=gender_types)
    licensce_no = models.CharField(max_length=255, blank=False, null=False)
    date_of_birth = models.CharField(max_length=255, blank=False, null=False)
    experience = models.FloatField(blank=False, null=False)
    location = models.CharField(max_length=255, blank=False, null=False)
    house_number =models.CharField(max_length=255, blank=False, null=False)
    pincode = models.CharField(max_length=255, blank=False, null=False)
    uniform_types = ((0, 'No'), (1, 'Yes'))
    uniform_type = models.IntegerField(default=0, choices=uniform_types)
    station_types = ((0, 'In Station'), (1, 'Out Station'), (2, 'Both'))
    station_type = models.IntegerField(default=0, choices=station_types)
    trip_types = ((0, 'One way'), (1, 'Round'),(2, 'Both'))
    trip_type = models.IntegerField(default=0, choices=trip_types)
    transmission_types = ((0, 'Automatic'), (1, 'Manual'),(2, 'Both'))
    transmission_type = models.IntegerField(default=0, choices=transmission_types)
    created_at = models.DateTimeField(auto_now_add=True)   
    updated_at = models.DateTimeField(auto_now_add=True)



class DriverVehicles(models.Model):
    id : models.AutoField(primary_key=True)
    driver = models.ForeignKey(User, on_delete=models.CASCADE, blank=False, null=False, related_name="driver_vehicles")
    vehicle_model_types = ((0, 'Suv'), (1, 'Sedan'), (2, 'Luxury'),(3, 'Hatchback'))
    vehicle_model = models.IntegerField(default=0, choices=vehicle_model_types)


