chore: 添加chip_type
This commit is contained in:
parent
b06b482e1a
commit
94a290d49e
|
@ -76,6 +76,7 @@ class DeviceInfoMobileSerializer(serializers.ModelSerializer):
|
||||||
fields = [
|
fields = [
|
||||||
'device_id',
|
'device_id',
|
||||||
'device_name',
|
'device_name',
|
||||||
|
'chip_type',
|
||||||
'status',
|
'status',
|
||||||
'count',
|
'count',
|
||||||
'csq',
|
'csq',
|
||||||
|
@ -100,6 +101,9 @@ class DeviceInfoMobileSerializer(serializers.ModelSerializer):
|
||||||
return device.device_name
|
return device.device_name
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_chip_type(self, obj):
|
||||||
|
return obj.chip_type
|
||||||
|
|
||||||
def get_status(self, obj) -> int:
|
def get_status(self, obj) -> int:
|
||||||
return obj.online
|
return obj.online
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue