area create update serializer

This commit is contained in:
曹前明 2022-06-27 08:42:12 +08:00
parent ab669192bf
commit cdba3ef73e
1 changed files with 2 additions and 2 deletions

View File

@ -22,13 +22,13 @@ class AreaCreateUpdateSerializer(CustomModelSerializer):
class Meta:
model = Area
fields = ['name', 'level', 'number', 'visitor_yes', 'remployee_yes', 'employee_yes',
'belong_dept', 'count_people_min', 'count_people_max', 'count_people', 'cate']
'belong_dept', 'count_people_min', 'count_people_max', 'count_people', 'cate', 'stay_minute_min', 'stay_minute_max']
class AccessCreateSerializer(CustomModelSerializer):
class Meta:
model = Access
fields = ['type', 'area', 'obj_cate', 'post', 'employee']
fields = ['type', 'area', 'obj_cate', 'post', 'employee', 'dept', 'sort', 'stay_minute_min', 'stay_minute_max']
def create(self, validated_data):
post = validated_data.get('post', None)