OpenRealEstate / OpenRealEstate.NET

OBSOLETE REPO - PLEASE DO NOT USE. Use https://github.com/OpenRealEstate instead
MIT License
10 stars 10 forks source link

Media - have a unique ID to determine if it's new/old #33

Closed PureKrome closed 7 years ago

PureKrome commented 7 years ago

Currently, media is determined if it's new/old by the createdon or some mod-time value.

This doesn't exist for the new Media field (for Documents, ref to ref: #31) in the REAXml.

So .. we should have a string Id for each Media instance and this can be anything -> the date in a universal format or ticks or a guid (as a string). Documents are guids ... which is where this thought has originated from.

For ReaXML 'Documents' (i,e, media) => use the id xml attribute. For ReaXML 'Images' or 'Floorplans' => use the modtime attribute and nuke the createdOn property from ORE.

PureKrome commented 7 years ago

Images : id == xml element id attribute which is the order of the image. This is then converted to a number. If the order is m then this is magic-converted to 1. Floorplans: id == xml element id attribute which should be a number. Videos: id is never set. Documents: id == xml element id attribute. no conversion.

Fixed by #39