teamforus / forus

Platform voor de uitgifte van sociale regelingen
https://forus.io
GNU Affero General Public License v3.0
9 stars 3 forks source link

Prepare the list of all records to be in the system #75

Closed ghost closed 6 years ago

ghost commented 6 years ago

We need a list of records that we will work with in our initial implementation.

teamforus/forus.io#58

maxvisser commented 6 years ago

adding a list of attributes in google sheets

maxvisser commented 6 years ago
Key Expected Type Description
address PostalAddress or Text Physical address of the item.
birthDate Date Date of birth.
children Person A child of the person.
contactPoint ContactPoint A contact point for a person or organization. Supersedes contactPoints.
email Text Email address.
familyName Text Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property.
gender GenderType or Text Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender.
givenName Text Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property.
jobTitle Text The job title of the person (for example, Financial Manager).
nationality Country Nationality of the person.
netWorth MonetaryAmount or PriceSpecification The total financial value of the person as calculated by subtracting assets from liabilities.
parent Person A parent of this person. Supersedes parents.
sponsor Organization or Person A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
spouse Person The person's spouse.
taxID Text The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain.
telephone Text The telephone number.
vatID Text The Value-added Tax ID of the organization or person.
workLocation ContactPoint or Place A contact location for a person's place of work.
worksFor Organization Organizations that the person works for.
seller BuyAction orDemand orFlight orOffer orOrder An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. Supersedes merchant.
baseSalary MonetaryAmount or Number or PriceSpecification The base salary of the job or of an employee in an EmployeeRole.
maxvisser commented 6 years ago

@danrminds did you mean this list?

danrminds commented 6 years ago

Yes. Now we have to see what we really need from this list and see if we miss anything from what we need

maxvisser commented 6 years ago

@danrminds, @HardCoderNET and myself discussed the attributes from this issue and decided to remove some attributes from the previous list and add expected values:

Key Expected Type Description Expected value
address PostalAddress or Text Physical address of the item. 9712RG, 45, A
birthDate Date Date of birth. 2015-01-30
children Person A child of the person. 0xDc0a52E14953551f4a7Ed379a516B4F2699Ee312, 0x4353452E1495FSDFA516B4F2699Ee312
email Text Email address. john@doe.com
primaryEmail Text Email address. john@doe.com PK
familyName Text Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property. Doe
gender GenderType or Text Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender. Male, Female, Neutral
givenName Text Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property. John
netWorth MonetaryAmount or PriceSpecification The total financial value of the person as calculated by subtracting assets from liabilities. 12000
parent Person A parent of this person. Supersedes parents. 0xDc0a52E14953551f4a7Ed379a516B4F2699Ee312, 0x4353452E1495FSDFA516B4F2699Ee312
spouse Person The person's spouse. 0xDc0a52E14953551f4a7Ed379a516B4F2699Ee312
taxID Text The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. 29450561
telephone Text The telephone number. 6245412102
baseSalary MonetaryAmount or Number or PriceSpecification The base salary of the job or of an employee in an EmployeeRole. 1200
maxvisser commented 6 years ago

@jamalv i had a discussion with Dan about email and primaryEmail. primaryEmail is not a schema.org field. What do you think, should we even make this distinction between emails in the MVP?

danrminds commented 6 years ago

The only option to not do that distinction - to make the email unique for everybody for the MVP

maxvisser commented 6 years ago

we only use the unique one right? (primaryEmail), so I don't see anything wrong with making all email adresses unique for the mvp

danrminds commented 6 years ago

Yes, it just does not allow users to add more emails

martijndoornik commented 6 years ago

I suggest using Schema.org's "identifier" from the Think implementation (https://schema.org/Person, about a third down) and implementing it as an email, and thus treat it as one.

maxvisser commented 6 years ago

@martijndoornik I think it needs to be unique for it to be used as a option for restoring your identity via mail. @danrminds correct?

martijndoornik commented 6 years ago

According to schema.org's Thing: "The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links."

This means that we can use the email as an identifier and treat it as an email. It is basically the same thing as "primaryEmail", but then the label matches schema.org's label

jamalv commented 6 years ago

Wouldn’t it make more sense to make the identifier the ethereum address (e.g. 0x2lkj2..)?

Regarding email; I would not like to break the schema.org standard by replacing email with primaryEmail since email is very important and should return a value if possible. If we break it, I would suggest using alternateEmail for extra email adresses instead, and treat email as primaryEmail.

maxvisser commented 6 years ago

I think adding an identifier (public key or email) would be a good idea none the less

danrminds commented 6 years ago

Using an address or eth address as an identifier could work, and will work for the application logic, but we need a user-friendly identifier as well, that should also be unique. Cases where we need it:

  1. Restore identity / login to identity via email address
  2. As a sponsor I want to assign certain roles to an identity (easiest to do that will be to introduce the email as the identifier, rather than introducing an ETH address)
maxvisser commented 6 years ago

As of the second one; other dApps are now fixing the usability of eth adresses as identifiers by creating a domainname like service (ENS: Ethereum Names Services). Where you can create a .eth domain for your ethereum address.

We could create some simulation of this process and use that as an identifier. It would not work for point 1 though, only for your second point.

martijndoornik commented 6 years ago

Also regarding the second one: when it comes up, I wanna research using the native contacts to save Ethereum addresses. It should be possible, I just need to figure out how.

jamalv commented 6 years ago

As a unique user-facing identifier I agree email addresses are the most pragmatic option right now. For sponsors and validators it would be nice to also have them be displayed / searchable by name.

Identification records:

Key Expected Type Description Expected value
identifier Text The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See background notes for more details. 0xDc0a52E14 953551f4a7Ed 379a516B4F2 699Ee312
email Text Email address. john@doe.com
givenName Text Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property. John
familyName Text Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property. Doe

Side note: I think phone number is a practical identifier as well. It is a stronger link to a person then an email address (most people have plenty email addresses over the years, but I've had my phone number for over 10 years now). We could offer some kind of validation service that sends an activation code/link to your phone number, same as we do with email right now. On the short term we can keep using email address though.

I think linking ethereum adresses to phone numbers can also be a good thing for Discoverability. For the me app it enables the same kind of integration as messaging apps have, where it can link to your address book to automatically discover who of your contacts are using the system. Some interesting work is being done here: https://eth2.io/#/

On the long term the addresses should probably be added to your address book:

image
jamalv commented 6 years ago

And let's not forget one of the most important ones: municipality. We'll need it to differentiate who is eligible for what fund when we grow beyond Zuidhorn / Westerkwartier. I could not find it in schema.org which means we might have to make it a custom key. I think the key should be descriptive and concrete to be useful. We could simply use municipality, but then do they live/work there?

Key Expected Type Description Expected Value
residentOfMunicipality Text The municipality where this person resides. Zuidhorn

Alternative key proposals: residesInMunicipality, residentOfMunicipality, livesInMunicipality,

maxvisser commented 6 years ago

Why not use address?

jamalv commented 6 years ago

If the address is in Oldenhove, how will we know if this in Westerkwartier or some other municipality? We would need to query some database to check what address/village is in which municipality. We can do some research into that.

I like it since it is the axiom on which the municipality is based, but for now, for kindpakket, directly adding municipality is more practical.

maxvisser commented 6 years ago

Me and Dan discussed this and we tought that a postalcode would be enough to get the municipallity. Zuidhorn would be: 9800-9809, 9830-9849, 9880-9889. We should ask someone from zuidhorn to verify this.

jamalv commented 6 years ago

Allright, that’s interesting, there are probably some registries for this. Something to check.

maxvisser commented 6 years ago

this also adds to a new discussion between core data and processed data (address contains street adress, postal code, city, region, country etc)

we could add all of those seperately. "address": { "@type": "PostalAddress", "addressLocality": "Seattle", "addressRegion": "WA", "postalCode": "98052", "streetAddress": "20341 Whitworth Institute 405 N. Whitworth" },

https://schema.org/PostalAddress also has a relation to ContactPoint. Maybe a contact point for a specific address can be a Municipality. This municipality should then have areaServed which holds a GeoShape or postalcodes.