from django.db import models


# Create your models here.
class Car_basic(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    car_color = models.CharField(max_length=10, null=True, blank=True)
    register_date = models.DateTimeField(null=True, blank=True)
    user_name = models.CharField(max_length=20, null=True, blank=True)
    traffic_number = models.CharField(max_length=30, null=True, blank=True)
    # traffic_area = models.CharField(max_length=50, null=True, blank=True)
    release_time = models.DateTimeField(null=True, blank=True)
    car_type = models.CharField(max_length=10, null=True, blank=True)
    manufacture_name = models.CharField(max_length=20, null=True, blank=True)
    manufacture_type = models.CharField(max_length=50, null=True, blank=True)
    manufacture_date = models.DateTimeField(null=True, blank=True)
    # goods_type = models.CharField(max_length=10, null=True, blank=True)  # 国产/进口
    vin_number = models.CharField(max_length=50, null=True, blank=True)
    total_number = models.CharField(max_length=50, null=True, blank=True)
    # car_size = models.CharField(max_length=50, null=True, blank=True)
    # packing_size = models.CharField(max_length=50, null=True, blank=True)
    # total_number = models.CharField(max_length=50, null=True, blank=True)
    curb_weight = models.CharField(max_length=50, null=True, blank=True)
    traction_weight = models.CharField(max_length=50, null=True, blank=True)
    sure_weight = models.CharField(max_length=50, null=True, blank=True)
    sure_people_number = models.CharField(max_length=50, null=True, blank=True)
    engine_type = models.CharField(max_length=50, null=True, blank=True)
    engine_number = models.CharField(max_length=50, null=True, blank=True)
    engine_displacement = models.CharField(max_length=50, null=True, blank=True)
    engine_power = models.CharField(max_length=50, null=True, blank=True)
    displacement_standard = models.CharField(max_length=50, null=True, blank=True)
    battery_type = models.CharField(max_length=50, null=True, blank=True)
    motor_model = models.CharField(max_length=50, null=True, blank=True)
    motor_power = models.CharField(max_length=50, null=True, blank=True)
    power_type = models.CharField(max_length=20, null=True, blank=True)
    axle_number = models.CharField(max_length=10, null=True, blank=True)
    detection_year_date = models.DateTimeField(null=True, blank=True)
    year_dated = models.DateTimeField(null=True, blank=True)

    # wheelbase = models.CharField(max_length=10, null=True, blank=True)
    # tires_number = models.CharField(max_length=10, null=True, blank=True)
    # braking_system = models.CharField(max_length=10, null=True, blank=True)
    # brak_form = models.CharField(max_length=20, null=True, blank=True)
    # abs_boolean = models.CharField(max_length=10, null=True, blank=True)
    # transmission_form = models.CharField(max_length=10, null=True, blank=True)
    # slow_machine = models.CharField(max_length=10, null=True, blank=True)
    # air_system = models.CharField(max_length=10, null=True, blank=True)
    # gps_boolean = models.CharField(max_length=10, null=True, blank=True)

    class Meta:
        db_table = 'car_basic'
        verbose_name = 'car_basic'


class Car_detection(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    detection_name = models.CharField(max_length=30, null=True, blank=True)
    detection_date = models.DateTimeField(null=True, blank=True)
    report_id = models.CharField(max_length=30, null=True, blank=True)
    detection_validity = models.DateTimeField(null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_detection'
        verbose_name = 'car_detection'


class Car_repair(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    total_km = models.DecimalField(max_digits=12, decimal_places=3, null=True, blank=True)
    repair_date = models.DateTimeField(null=True, blank=True)
    repair_type = models.CharField(max_length=10, null=True, blank=True)
    repair_content = models.CharField(max_length=50, null=True, blank=True)
    repair_name = models.CharField(max_length=30, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    card_number = models.CharField(max_length=20, null=True, blank=True)

    class Meta:
        db_table = 'car_repair'
        verbose_name = 'car_repair'


class Car_replace(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    replace_name = models.CharField(max_length=20, null=True, blank=True)
    replace_date = models.DateTimeField(null=True, blank=True)
    produce_name = models.CharField(max_length=20, null=True, blank=True)
    replace_type = models.CharField(max_length=20, null=True, blank=True)
    produce_id = models.CharField(max_length=20, null=True, blank=True)
    repair_company = models.CharField(max_length=20, null=True, blank=True)
    register_name = models.CharField(max_length=20, null=True, blank=True)
    pass_id = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_replace'
        verbose_name = 'car_replace'


class Car_change(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    change_content = models.CharField(max_length=100, null=True, blank=True)
    change_date = models.DateTimeField(null=True, blank=True)
    change_reason = models.CharField(max_length=20, null=True, blank=True)
    register_name = models.CharField(max_length=20, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_change'
        verbose_name = 'car_change'


class Car_km(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    start_date = models.DateTimeField(null=True, blank=True)
    end_date = models.DateTimeField(null=True, blank=True)
    start_address = models.CharField(max_length=100, null=True, blank=True)
    end_address = models.CharField(max_length=100, null=True, blank=True)
    km = models.DecimalField(max_digits=12, decimal_places=3, null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_km'
        verbose_name = 'car_km'


class Car_traffic(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    traffic_location = models.CharField(max_length=30, null=True, blank=True)
    traffic_date = models.DateTimeField(null=True, blank=True)
    traffic_type = models.CharField(max_length=10, null=True, blank=True)
    traffic_responsibility = models.CharField(max_length=30, null=True, blank=True)
    register_name = models.CharField(max_length=30, null=True, blank=True)
    car_situation = models.CharField(max_length=100, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_traffic'
        verbose_name = 'car_traffic'

from django.db import models


# Create your models here.
class Car_basic(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    car_color = models.CharField(max_length=10, null=True, blank=True)
    register_date = models.DateTimeField(null=True, blank=True)
    user_name = models.CharField(max_length=20, null=True, blank=True)
    traffic_number = models.CharField(max_length=30, null=True, blank=True)
    # traffic_area = models.CharField(max_length=50, null=True, blank=True)
    release_time = models.DateTimeField(null=True, blank=True)
    car_type = models.CharField(max_length=10, null=True, blank=True)
    manufacture_name = models.CharField(max_length=20, null=True, blank=True)
    manufacture_type = models.CharField(max_length=50, null=True, blank=True)
    manufacture_date = models.DateTimeField(null=True, blank=True)
    # goods_type = models.CharField(max_length=10, null=True, blank=True)  # 国产/进口
    vin_number = models.CharField(max_length=50, null=True, blank=True)
    total_number = models.CharField(max_length=50, null=True, blank=True)
    # car_size = models.CharField(max_length=50, null=True, blank=True)
    # packing_size = models.CharField(max_length=50, null=True, blank=True)
    # total_number = models.CharField(max_length=50, null=True, blank=True)
    curb_weight = models.CharField(max_length=50, null=True, blank=True)
    traction_weight = models.CharField(max_length=50, null=True, blank=True)
    sure_weight = models.CharField(max_length=50, null=True, blank=True)
    sure_people_number = models.CharField(max_length=50, null=True, blank=True)
    engine_type = models.CharField(max_length=50, null=True, blank=True)
    engine_number = models.CharField(max_length=50, null=True, blank=True)
    engine_displacement = models.CharField(max_length=50, null=True, blank=True)
    engine_power = models.CharField(max_length=50, null=True, blank=True)
    displacement_standard = models.CharField(max_length=50, null=True, blank=True)
    battery_type = models.CharField(max_length=50, null=True, blank=True)
    motor_model = models.CharField(max_length=50, null=True, blank=True)
    motor_power = models.CharField(max_length=50, null=True, blank=True)
    power_type = models.CharField(max_length=20, null=True, blank=True)
    axle_number = models.CharField(max_length=10, null=True, blank=True)
    detection_year_date = models.DateTimeField(null=True, blank=True)
    year_dated = models.DateTimeField(null=True, blank=True)

    # wheelbase = models.CharField(max_length=10, null=True, blank=True)
    # tires_number = models.CharField(max_length=10, null=True, blank=True)
    # braking_system = models.CharField(max_length=10, null=True, blank=True)
    # brak_form = models.CharField(max_length=20, null=True, blank=True)
    # abs_boolean = models.CharField(max_length=10, null=True, blank=True)
    # transmission_form = models.CharField(max_length=10, null=True, blank=True)
    # slow_machine = models.CharField(max_length=10, null=True, blank=True)
    # air_system = models.CharField(max_length=10, null=True, blank=True)
    # gps_boolean = models.CharField(max_length=10, null=True, blank=True)

    class Meta:
        db_table = 'car_basic'
        verbose_name = 'car_basic'


class Car_detection(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    detection_name = models.CharField(max_length=30, null=True, blank=True)
    detection_date = models.DateTimeField(null=True, blank=True)
    report_id = models.CharField(max_length=30, null=True, blank=True)
    detection_validity = models.DateTimeField(null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_detection'
        verbose_name = 'car_detection'


class Car_repair(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    total_km = models.DecimalField(max_digits=12, decimal_places=3, null=True, blank=True)
    repair_date = models.DateTimeField(null=True, blank=True)
    repair_type = models.CharField(max_length=10, null=True, blank=True)
    repair_content = models.CharField(max_length=50, null=True, blank=True)
    repair_name = models.CharField(max_length=30, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    card_number = models.CharField(max_length=20, null=True, blank=True)

    class Meta:
        db_table = 'car_repair'
        verbose_name = 'car_repair'


class Car_replace(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    replace_name = models.CharField(max_length=20, null=True, blank=True)
    replace_date = models.DateTimeField(null=True, blank=True)
    produce_name = models.CharField(max_length=20, null=True, blank=True)
    replace_type = models.CharField(max_length=20, null=True, blank=True)
    produce_id = models.CharField(max_length=20, null=True, blank=True)
    repair_company = models.CharField(max_length=20, null=True, blank=True)
    register_name = models.CharField(max_length=20, null=True, blank=True)
    pass_id = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_replace'
        verbose_name = 'car_replace'


class Car_change(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    change_content = models.CharField(max_length=100, null=True, blank=True)
    change_date = models.DateTimeField(null=True, blank=True)
    change_reason = models.CharField(max_length=20, null=True, blank=True)
    register_name = models.CharField(max_length=20, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_change'
        verbose_name = 'car_change'


class Car_km(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    start_date = models.DateTimeField(null=True, blank=True)
    end_date = models.DateTimeField(null=True, blank=True)
    start_address = models.CharField(max_length=100, null=True, blank=True)
    end_address = models.CharField(max_length=100, null=True, blank=True)
    km = models.DecimalField(max_digits=12, decimal_places=3, null=True, blank=True)
    register_name = models.CharField(max_length=10, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_km'
        verbose_name = 'car_km'


class Car_traffic(models.Model):
    car_number = models.CharField(max_length=10, null=True, blank=True)
    traffic_location = models.CharField(max_length=30, null=True, blank=True)
    traffic_date = models.DateTimeField(null=True, blank=True)
    traffic_type = models.CharField(max_length=10, null=True, blank=True)
    traffic_responsibility = models.CharField(max_length=30, null=True, blank=True)
    register_name = models.CharField(max_length=30, null=True, blank=True)
    car_situation = models.CharField(max_length=100, null=True, blank=True)
    other = models.CharField(max_length=100, null=True, blank=True)

    class Meta:
        db_table = 'car_traffic'
        verbose_name = 'car_traffic'

# Create your models here. # traffic_area = models.CharField(max_length=50, null=True, blank=True) # goods_type = models.CharField(max_length=10, null=True, blank=True)  # 国产/进口 # car_size = models.CharField(max_length=50, null=True, blank=True) # packing_size = models.CharField(max_length=50, null=True, blank=True) # total_number = models.CharField(max_length=50, null=True, blank=True) # wheelbase = models.CharField(max_length=10, null=True, blank=True) # tires_number = models.CharField(max_length=10, null=True, blank=True) # braking_system = models.CharField(max_length=10, null=True, blank=True) # brak_form = models.CharField(max_length=20, null=True, blank=True) # abs_boolean = models.CharField(max_length=10, null=True, blank=True) # transmission_form = models.CharField(max_length=10, null=True, blank=True) # slow_machine = models.CharField(max_length=10, null=True, blank=True) # air_system = models.CharField(max_length=10, null=True, blank=True) # gps_boolean = models.CharField(max_length=10, null=True, blank=True)