from django.db import models

from vehicles.models import TransmissionTypes, VehicleModels, VehicleTypes
from accounts.models import User
# Create your models here.

class User_Vehicles(models.Model):
    user = models.ForeignKey(User, default="", blank=False, null=False, on_delete=models.CASCADE)
    vehicle_model = models.ForeignKey(VehicleModels, default="", blank=True, null=True, on_delete=models.CASCADE)
    vehicle_type = models.ForeignKey(VehicleTypes, default="", blank=True, null=True, on_delete=models.CASCADE)
    transmission_type = models.ForeignKey(TransmissionTypes, default="", blank=True, null=True, on_delete=models.CASCADE)
    vehicle_model_name = models.CharField(blank=True,  null=True, max_length=255, default="")
    vehicle_type_name = models.CharField(blank=True,  null=True, max_length=255, default="")
    transmission_type_name = models.CharField(blank=True,  null=True, max_length=255, default="")
    vehicle_name = models.CharField(blank=True,  null=True, max_length=255, default="")
    vehicle_no = models.CharField(blank=True,  null=True, max_length=255, default="")
    is_default = models.IntegerField(default=0, choices=((0, "No"), (1, "Yes")))