Author Topic: Database documentation  (Read 6084 times)

0 Members and 1 Guest are viewing this topic.

tharon

  • Jr. Member
  • **
  • Posts: 2
Database documentation
« 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
« Last Edit: December 09, 2015, 05:36:08 PM by tharon »

scalior

  • Global Moderator
  • Native
  • *****
  • Posts: 106
  • Serve customers on mobile. Get Wurrd for Mibew app
    • Wurrd for Mibew
Re: Database documentation
« Reply #1 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

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: Database documentation
« Reply #2 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:

  • 0 -- STATE_QUEUE -- User in the users queue
  • 1 -- STATE_WAITING -- User waiting for operator
  • 2 -- STATE_CHATTING -- Conversation is in progress
  • 3 -- STATE_CLOSED -- Thread is closed
  • 4 -- STATE_LOADING -- Thread is just created
  • 5 -- STATE_LEFT -- User left message without starting a conversation
  • 6 -- STATE_INVITED -- Visitor was invited to chat by operator

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


tharon

  • Jr. Member
  • **
  • Posts: 2
Re: Database documentation
« Reply #3 on: December 10, 2015, 10:48:06 AM »
Thank scalior and Dmitriy Simushev, the two answers helped a lot in my doubt.