تصميم:دواسوا/data

من ويكي أضِف
< تصميم:دواسوا
مراجعة 19:53، 1 يناير 2017 بواسطة أحمد (نقاش | مساهمات) (بالنقل عن تصميم:دواسوا/API و الإضافة)
(فرق) → مراجعة أقدم | المراجعة الحالية (فرق) | مراجعة أحدث ← (فرق)

Data structures

Listing data record is comprised of the following two data structures:

package-info

name : string
the name of the medicine in Latin script
name_arabic : string
the name of the medicine in Arabic script, if available (optional)
expiry : date
the date of expiry of the medicine. The significance is in the precision of months, i.e YYYY/MM
package-state : string(fabrica | opened | partial)
The case of the packaging of the medicine.
governrate : string(predefined)
the governerate where the package is to be picked up
description : text
a brief description, and/or notes by the submitter
photo : blob
an optional photograph of the package


contact-info

email-address : string(email-address)
email address identifies a user who enlists an item. It is used to communicate with the user to confirm his listing, and to confirm the removal of a listing. It's a user's means to control his listings. It could be made invisible to viewers of a listing unless no phone number is given, in which case it is the only means to contact the user by those interested in a listing.
name : string
A friendly name to greet the user by those contacting regarding a listing.
phone-number : string(phone-number)
An optional method to contact a user by those interested in a listing. If entered then it is visible.
email_address_visible : boolean
Determines whether the email address is visible. Ignored if no valid phone number is entered.


Records

Listings

package-info
contact-info
submission-date
timestamp
instatement-date
timestamp

Archive

package-info
contact-info
except:
name is omitted
email-address is replaced with base62(sha512(email-address))
phone-number is replaces with base62(sha512(phone-number))
removal-date
timestamp
removal-reason
possible values:
unconfirmed
removed-by-user
expired

Data types

string(email-address)
an addr-spec a la rfc:5322
string(phone-number)
phone number a la rfc:3966