2019-04-24 09:24:05 +00:00
|
|
|
/// Database contract
|
|
|
|
///
|
|
|
|
/// @author Pierre HUBERT
|
|
|
|
|
|
|
|
/// Main information
|
|
|
|
class DatabaseContract {
|
|
|
|
static const DATABASE_VERSION = 1;
|
|
|
|
static const DATABASE_FILE_NAME = "database.sqlite";
|
|
|
|
}
|
|
|
|
|
2019-04-24 11:56:56 +00:00
|
|
|
/// Base table contract
|
|
|
|
abstract class BaseTableContract {
|
|
|
|
static const C_ID = "id";
|
|
|
|
}
|
|
|
|
|
2019-04-24 09:24:05 +00:00
|
|
|
/// User table contract
|
|
|
|
abstract class UserTableContract {
|
|
|
|
static const TABLE_NAME = "users";
|
2019-04-24 11:56:56 +00:00
|
|
|
static const C_ID = BaseTableContract.C_ID;
|
2019-04-24 09:24:05 +00:00
|
|
|
static const C_FIRST_NAME = "first_name";
|
|
|
|
static const C_LAST_NAME = "last_name";
|
|
|
|
static const C_VISIBILITY = "visibility";
|
|
|
|
static const C_VIRTUAL_DIRECTORY = "virtual_directory";
|
|
|
|
static const C_ACCOUNT_IMAGE_URL = "account_image_url";
|
2019-04-24 12:25:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Conversations table contract
|
|
|
|
abstract class ConversationTableContract {
|
|
|
|
static const TABLE_NAME = "conversations";
|
|
|
|
static const C_ID = BaseTableContract.C_ID;
|
|
|
|
static const C_OWNER_ID = "owner_id";
|
|
|
|
static const C_LAST_ACTIVE = "last_active";
|
|
|
|
static const C_NAME = "name";
|
|
|
|
static const C_FOLLOWING = "following";
|
|
|
|
static const C_SAW_LAST_MESSAGE = "saw_last_message";
|
|
|
|
static const C_MEMBERS = "members";
|
2019-04-27 06:42:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Conversations messages table contract
|
|
|
|
abstract class ConversationsMessagesTableContract {
|
|
|
|
static const TABLE_NAME = "conversations_messages";
|
|
|
|
static const C_ID = BaseTableContract.C_ID;
|
|
|
|
static const C_CONVERSATION_ID = "conversation_id";
|
|
|
|
static const C_USER_ID = "user_id";
|
|
|
|
static const C_TIME_INSERT = "time_insert";
|
|
|
|
static const C_MESSAGE = "message";
|
|
|
|
static const C_IMAGE_URL = "image_url";
|
2019-05-04 17:35:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Friends table contract
|
|
|
|
abstract class FriendsListTableContract {
|
|
|
|
static const TABLE_NAME = "friends";
|
|
|
|
static const C_ID = BaseTableContract.C_ID;
|
|
|
|
static const C_ACCEPTED = "accepted";
|
|
|
|
static const C_LAST_ACTIVE = "last_active";
|
|
|
|
static const C_FOLLOWING = "following";
|
|
|
|
static const C_CAN_POST_TEXTS = "can_post_texts";
|
2019-04-24 09:24:05 +00:00
|
|
|
}
|