ArrayListやめた

This commit is contained in:
ろむねこ 2023-12-14 11:24:36 +09:00
parent ca82fe5e55
commit 8a1314446d
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -4,15 +4,18 @@ import androidx.annotation.NonNull;
import androidx.room.ColumnInfo; import androidx.room.ColumnInfo;
import androidx.room.Entity; import androidx.room.Entity;
import androidx.room.PrimaryKey; import androidx.room.PrimaryKey;
import androidx.room.TypeConverter;
import androidx.room.TypeConverters; import androidx.room.TypeConverters;
import one.nem.lacerta.source.database.common.DateTypeConverter; import one.nem.lacerta.source.database.common.DateTypeConverter;
import one.nem.lacerta.source.database.common.TagArrayListConverter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
@Entity(tableName = "document") @Entity(tableName = "document")
@TypeConverters(DateTypeConverter.class) @TypeConverters({DateTypeConverter.class, TagArrayListConverter.class})
public class DocumentEntity { public class DocumentEntity {
@PrimaryKey @PrimaryKey
@ColumnInfo(name = "id") @ColumnInfo(name = "id")
@ -35,5 +38,5 @@ public class DocumentEntity {
public String defaultBranch; // デフォルトブランチ public String defaultBranch; // デフォルトブランチ
@ColumnInfo(name = "tag_ids") @ColumnInfo(name = "tag_ids")
public ArrayList<String> tagIds; // タグ public List<String> tagIds; // タグ
} }