Last week I decided to start contributing to Vespolina. After spending some time on IRC with some useful conversations, I started on the CustomerBundle.
I started thinking about the model, expanding the basic properties there are at the moment.
Below a proposal of the model. Before I created the needed documents (and long before creating a PR), I want others to take a look at it.
Although I 'designed' this with MongoDB in mind, it should be quit easy to make it work with an ORM implementation.
I named the model Account because I saw inspiran mentioning on IRC, that he might want to use Account instead of Customer in Vespolina.
-------------------------------------------------
Account:
accountId
type: (personal, business)
valuta: // ISO_4217
companyName
address[]:
type: (invoice, delivery)
street
streetNumber
streetNumberSuffix
postalCode
region/state
country
contact[]:
primary: boolean
firstName
lastName
email
phone[]:
type // mobile, work, private
number
dateOfBirth
jobTitle
department
AccountGroup:
name
taxCategory
-------------------------------------------------
Note: The address[], contact[] and phone[] would become embedded documents.
There are a few things I'm not quit sure about and sure like some feedback.
- Personal vs Business
First of all I'm not sure about the way we should handle and save company information.
It depends if we want to make a big distinction between personal and business accounts.
We can also decide to create a separate model for companies and reference those from the Account when needed. But then we probably need to save the address information in both models, so that isn't a really great options.
I like to hear other ideas and feedback on that!
- AccountGroup
I added AccountGroup separately. Just because I don't really have an idea what to do with it. So please feel free to tell me if anything is missing :)
- CRM
Also, I don't have much knowledge of CRM systems, so I might forgot some things that we really need.
And a minor disclaimer: I think I've read all the Wiki's, discussions and documentation there is about the CustomerBundle, but I still might have missed some information that would result in a different model design.
Willem-Jan