diff --git a/app/Services/CheckinCsvExporter.php b/app/Services/CheckinCsvExporter.php index a94ec32..22607a0 100644 --- a/app/Services/CheckinCsvExporter.php +++ b/app/Services/CheckinCsvExporter.php @@ -30,7 +30,7 @@ class CheckinCsvExporter $csv->addStreamFilter('convert.mbstring.encoding.UTF-8:SJIS-win'); } - $header = ['日時', 'ノート', 'オカズリンク']; + $header = ['日時', 'ノート', 'オカズリンク', '非公開', 'センシティブ']; for ($i = 1; $i <= 32; $i++) { $header[] = "タグ{$i}"; } @@ -45,6 +45,8 @@ class CheckinCsvExporter $ejaculation->ejaculated_date->format('Y/m/d H:i'), $ejaculation->note, $ejaculation->link, + self::formatBoolean($ejaculation->is_private), + self::formatBoolean($ejaculation->is_too_sensitive), ]; foreach ($ejaculation->tags->take(32) as $tag) { $record[] = $tag->name; @@ -54,4 +56,9 @@ class CheckinCsvExporter }); }); } + + private static function formatBoolean($value): string + { + return $value ? 'true' : 'false'; + } }