diff --git a/app/src/main/kotlin/org/ntlab/leftoverrecipe/model/db/RecipeData.kt b/app/src/main/kotlin/org/ntlab/leftoverrecipe/model/db/RecipeData.kt index c357a74..40a4834 100644 --- a/app/src/main/kotlin/org/ntlab/leftoverrecipe/model/db/RecipeData.kt +++ b/app/src/main/kotlin/org/ntlab/leftoverrecipe/model/db/RecipeData.kt @@ -7,9 +7,16 @@ * Created by matsumoto_k on 2017/07/06. */ open class RecipeData( + /** + * date:作成した火付け + * recipeName:料理名 + * makeTimeZone:作った時間帯(0:朝,1:昼,2:晩) + * comment:料理についてのコメント + * image:料理の画像データ + */ open var date: Date = Date(), open var recipeName: String = "", - open var makeTimeZone: String = "", + open var makeTimeZone: Int = 0, open var comment: String = "", open var image: ByteArray? = null ) : RealmObject() \ No newline at end of file diff --git a/app/src/main/kotlin/org/ntlab/leftoverrecipe/viewmodel/RegistDialogViewModel.kt b/app/src/main/kotlin/org/ntlab/leftoverrecipe/viewmodel/RegistDialogViewModel.kt index ff156c3..251e72f 100644 --- a/app/src/main/kotlin/org/ntlab/leftoverrecipe/viewmodel/RegistDialogViewModel.kt +++ b/app/src/main/kotlin/org/ntlab/leftoverrecipe/viewmodel/RegistDialogViewModel.kt @@ -57,7 +57,7 @@ if (bitmap != null) recipeData.image = BitmapUtil.createImageByteArray(this.bitmap!!) if (selectedPosition.get() != null) { - println(selectedPosition.get()) + recipeData.makeTimeZone = selectedPosition.get() } RecipeDataRealm.insert(recipeData)