feat: 添加是否新能源字段
This commit is contained in:
parent
a891692b71
commit
718f594a4b
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.2.12 on 2024-03-12 08:34
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('enp', '0007_auto_20240228_1618'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='vehicleaccess',
|
||||||
|
name='is_new_energy',
|
||||||
|
field=models.BooleanField(default=False, verbose_name='是否新能源'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -124,6 +124,7 @@ class VehicleAccess(BaseModel):
|
||||||
access_time = models.DateTimeField('出入时间', null=True, blank=True)
|
access_time = models.DateTimeField('出入时间', null=True, blank=True)
|
||||||
emission_standard = models.CharField(
|
emission_standard = models.CharField(
|
||||||
'排放标准', max_length=10, null=True, blank=True)
|
'排放标准', max_length=10, null=True, blank=True)
|
||||||
|
is_new_energy = models.BooleanField('是否新能源', default=False)
|
||||||
door_name = models.CharField('门禁名称', max_length=10, null=True, blank=True)
|
door_name = models.CharField('门禁名称', max_length=10, null=True, blank=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ class VehicleAccessViewSet(ListModelMixin, CustomGenericViewSet):
|
||||||
"vehicle_number": ['icontains'],
|
"vehicle_number": ['icontains'],
|
||||||
"emission_standard": ['exact', 'in'],
|
"emission_standard": ['exact', 'in'],
|
||||||
"type": ['exact', 'in'],
|
"type": ['exact', 'in'],
|
||||||
|
"is_new_energy": ["exact"],
|
||||||
"access_time": ['gte', 'lte', 'year', 'month', 'day', 'quarter', 'week']
|
"access_time": ['gte', 'lte', 'year', 'month', 'day', 'quarter', 'week']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue