fixed activity model version

This commit is contained in:
Mariotaku Lee 2016-06-07 11:18:17 +08:00
parent 79ea126fec
commit f8f5b34834
4 changed files with 46 additions and 29 deletions

View File

@ -14,7 +14,8 @@ import org.mariotaku.restfu.annotation.param.Queries;
@KeyValue(key = "include_reply_count", valueKey = "include_reply_count"), @KeyValue(key = "include_reply_count", valueKey = "include_reply_count"),
@KeyValue(key = "include_descendent_reply_count", valueKey = "include_descendent_reply_count"), @KeyValue(key = "include_descendent_reply_count", valueKey = "include_descendent_reply_count"),
@KeyValue(key = "include_ext_alt_text", valueKey = "include_ext_alt_text"), @KeyValue(key = "include_ext_alt_text", valueKey = "include_ext_alt_text"),
@KeyValue(key = "tweet_mode", valueKey = "tweet_mode") @KeyValue(key = "tweet_mode", valueKey = "tweet_mode"),
@KeyValue(key = "model_version", valueKey = "model_version")
}) })
public class StatusAnnotationTemplate { public class StatusAnnotationTemplate {
} }

View File

@ -0,0 +1,36 @@
package org.mariotaku.twidere.model;
import org.mariotaku.commons.objectcursor.LoganSquareCursorFieldConverter;
import org.mariotaku.library.objectcursor.annotation.CursorField;
import org.mariotaku.library.objectcursor.annotation.CursorObject;
import org.mariotaku.twidere.model.util.UserKeyCursorFieldConverter;
import org.mariotaku.twidere.provider.TwidereDataStore;
import org.mariotaku.twidere.provider.TwidereDataStore.Messages.Conversations;
/**
* Created by mariotaku on 16/6/6.
*/
@CursorObject(tableInfo = true, valuesCreator = true)
public class ParcelableMessageConversation {
@CursorField(value = Conversations._ID, type = TwidereDataStore.TYPE_PRIMARY_KEY)
public long _id;
@CursorField(Conversations.CONVERSATION_ID)
public String id;
@CursorField(value = Conversations.ACCOUNT_KEY, converter = UserKeyCursorFieldConverter.class)
public UserKey account_key;
@CursorField(value = Conversations.LAST_SEND_AT)
public long last_send_at;
@CursorField(Conversations.TEXT_UNESCAPED)
public String text_unescaped;
@CursorField(value = Conversations.MEDIA_JSON, converter = LoganSquareCursorFieldConverter.class)
public ParcelableMedia[] media;
@CursorField(value = Conversations.PARTICIPANTS, converter = LoganSquareCursorFieldConverter.class)
public ParcelableUser[] participants;
@CursorField(value = Conversations.SENDER_KEY, converter = UserKeyCursorFieldConverter.class)
public UserKey sender_key;
@CursorField(value = Conversations.RECIPIENT_KEY, converter = UserKeyCursorFieldConverter.class)
public UserKey recipient_key;
@CursorField(value = Conversations.REQUEST_CURSOR)
public String request_cursor;
}

View File

@ -1,25 +0,0 @@
package org.mariotaku.twidere.model;
import org.mariotaku.library.objectcursor.annotation.CursorField;
import org.mariotaku.library.objectcursor.annotation.CursorObject;
import org.mariotaku.twidere.model.util.UserKeyCursorFieldConverter;
import org.mariotaku.twidere.provider.TwidereDataStore.Messages.Entries;
/**
* Created by mariotaku on 16/3/28.
*/
@CursorObject
public class ParcelableMessageEntry {
@CursorField(value = Entries._ID, excludeWrite = true)
public long id;
@CursorField(value = Entries.ACCOUNT_KEY, converter = UserKeyCursorFieldConverter.class)
public UserKey account_key;
@CursorField(value = Entries.CONVERSATION_ID)
public String conversation_id;
@CursorField(value = Entries.UPDATED_AT)
public long updated_at;
@CursorField(value = Entries.TEXT_CONTENT)
public String text_content;
}

View File

@ -374,10 +374,15 @@ public interface TwidereDataStore {
interface Messages extends BaseColumns, InsertedDateColumns, AccountSupportColumns { interface Messages extends BaseColumns, InsertedDateColumns, AccountSupportColumns {
interface Entries extends BaseColumns, InsertedDateColumns, AccountSupportColumns { interface Conversations extends BaseColumns, AccountSupportColumns {
String CONVERSATION_ID = "conversation_id"; String CONVERSATION_ID = "conversation_id";
String UPDATED_AT = "updated_at"; String TEXT_UNESCAPED = "text_unescaped";
String TEXT_CONTENT = "text_content"; String LAST_SEND_AT = "last_send_at";
String MEDIA_JSON = "media_json";
String PARTICIPANTS = "participants";
String SENDER_KEY = "sender_key";
String RECIPIENT_KEY = "recipient_key";
String REQUEST_CURSOR = "request_cursor";
} }
} }