[IMP]pms_api_rest: added short_name in room datamodel and service and added default_code in room_type datamodel and service

This commit is contained in:
braisab
2022-05-06 17:41:52 +02:00
committed by Darío Lodeiros
parent bab106d5d5
commit 736c4058e0
4 changed files with 4 additions and 0 deletions

View File

@@ -16,3 +16,4 @@ class PmsRoomInfo(Datamodel):
name = fields.String(required=False, allow_none=True)
roomTypeId = fields.Integer(required=False, allow_none=True)
capacity = fields.Integer(required=False, allow_none=True)
shortName = fields.String(required=False, allow_none=True)

View File

@@ -15,3 +15,4 @@ class PmsRoomTypeInfo(Datamodel):
id = fields.Integer(required=False, allow_none=True)
name = fields.String(required=False, allow_none=True)
pms_property_ids = fields.List(fields.Integer(), required=False)
defaultCode = fields.String(required=False, allow_none=True)

View File

@@ -47,6 +47,7 @@ class PmsRoomService(Component):
name=room.name,
roomTypeId=room.room_type_id,
capacity=room.capacity,
shortName=room.short_name,
)
)
return result_rooms

View File

@@ -58,6 +58,7 @@ class PmsRoomTypeService(Component):
id=room.id,
name=room.name,
pms_property_ids=room.pms_property_ids.mapped("id"),
defaultCode=room.default_code,
)
)
return result_rooms