File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed
postutil/src/main/kotlin/com/rayfantasy/icode/postutil Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ public class CodeGood extends BaseModel implements Serializable {
7777 @ SerializedName ("favorite" )
7878 public Integer favorite ;
7979
80+ @ Expose
81+ @ Column (name = "reply" )
82+ @ SerializedName ("reply" )
83+ public Integer reply ;
84+
8085 @ Override
8186 public boolean equals (Object o ) {
8287 if (!(o instanceof CodeGood )) return false ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2016 Alex Zhang aka. ztc1997
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com .rayfantasy .icode .postutil .database ;
18+
19+ import com .raizlabs .android .dbflow .annotation .Migration ;
20+ import com .raizlabs .android .dbflow .sql .SQLiteType ;
21+ import com .raizlabs .android .dbflow .sql .migration .AlterTableMigration ;
22+ import com .rayfantasy .icode .postutil .bean .CodeGood ;
23+
24+ @ Migration (version = 2 , database = PostUtilDatabase .class )
25+ public class Migration2 extends AlterTableMigration <CodeGood > {
26+ public Migration2 () {
27+ super (CodeGood .class );
28+ }
29+
30+ @ Override
31+ public void onPreMigrate () {
32+ super .onPreMigrate ();
33+ addColumn (SQLiteType .INTEGER , "reply" );
34+ }
35+ }
Original file line number Diff line number Diff line change 2121@ Database (version = PostUtilDatabase .VERSION , name = PostUtilDatabase .NAME , generatedClassSeparator = "_" )
2222public class PostUtilDatabase {
2323 public static final String NAME = "icode_postutil" ;
24- public static final int VERSION = 1 ;
24+ public static final int VERSION = 2 ;
2525}
You can’t perform that action at this time.
0 commit comments