Mibew Messenger Community

General => Support => Topic started by: tharon on December 09, 2015, 05:31:28 PM

Title: Database documentation
Post by: tharon on December 09, 2015, 05:31:28 PM
Hello, I wonder if there is any documentation related to Mibew database. At the moment I have doubts regarding the "iState" on the table "thread" because I have an interest in knowing the customers contacted by chat but did not obtain return, those who have contacted and obtained feedback and those who came into contact 'offline '.
I'm using Mibew 2.1.0
Thanks,
Tharon Merizio
Title: Re: Database documentation
Post by: scalior on December 09, 2015, 08:55:41 PM
Hi Tharion,

I had come up with a state diagram for Mibew 1.6.x and haven't updated it for 2.x but it should be a good starting point. One thing which is missing here is the concept of invitations.
https://github.com/alberto234/mibew/blob/mibewmob-1.6.12/src/mibew/mobile/docs/design/ChatThreadStateDiagram.pdf

The values and some comments of the states can be found in the STATE_XXXXX constants defined in this file.
https://github.com/Mibew/mibew/blob/master/src/mibew/libs/classes/Mibew/Thread.php

My source has been through digging through source code. Will be glad to know if there is any other documentation that clarifies state transitions.

Eyong
Title: Re: Database documentation
Post by: Dmitriy Simushev on December 09, 2015, 09:50:37 PM
Unfortunately there is no docs about the Database. But there are some clues about the structure in https://github.com/Mibew/mibew/blob/master/src/mibew/configs/database_schema.yml

In addition to @scalior's answer I can list meanings of istate field values:


This description is taken from the sources (namely https://github.com/Mibew/mibew/blob/master/src/mibew/libs/classes/Mibew/Thread.php#L33-L60).

Title: Re: Database documentation
Post by: tharon on December 10, 2015, 10:48:06 AM
Thank scalior and Dmitriy Simushev, the two answers helped a lot in my doubt.