import type { DsAlert } from "@/lib/types";
import { at } from "./_helpers";
/**
* D-Secアラートのサンプルデータ
*
* ★ モックの DSA_INIT には「トークン期限」種別が含まれているが、移植しない(D-030)★
* 種別は security_off(セキュリティ無効)と disconnected(通信断)の2つだけ。
*
* docs/fixtures.md §6 のケース
* - 2種別
* - 3ステータス(未対応 / 対応中 / 対応済み)
* - メモあり / なし
*
* ★section_name は暫定のダミー値★
* `/dashboard` の security_banner が要求するが、実DB上の取得元が未確定。
* DB接続時に `lib/db/index.ts` の prismaSource 側で実際の取得元に差し替える。
*/
export const dsAlerts: DsAlert[] = [
{
id: 1,
alert_type: "security_off",
device_serial: "DS-001",
facility_id: 1,
facility_name: "メガバリューマート中央本店",
section_name: "1F売り場",
detected_at: at(0, "03:42"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 2,
alert_type: "disconnected",
device_serial: "DS-005",
facility_id: 11,
facility_name: "バリューマート川下店",
section_name: "2F衣料品",
detected_at: at(0, "02:55"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 3,
alert_type: "disconnected",
device_serial: "DS-004",
facility_id: 5,
facility_name: "メガバリューマート港南総本店",
section_name: "1Fレジ前",
detected_at: at(1, "23:10"),
resolution_status: "in_progress",
responded_at: at(0, "09:05"),
resolved_at: null,
memo: "回線業者に確認中",
},
{
id: 4,
alert_type: "security_off",
device_serial: "DS-003",
facility_id: 4,
facility_name: "バリューマート西通り店",
section_name: "B1食品",
detected_at: at(1, "03:55"),
resolution_status: "done",
responded_at: at(1, "08:40"),
resolved_at: at(1, "09:15"),
memo: "正常復帰を確認",
},
// --- 11件以上(ページング確認用)に増やすため追加 ---
// ★ disconnected × done の組み合わせは意図的に作らない(docs/fixtures.md の0件ケース)★
{
id: 5,
alert_type: "security_off",
device_serial: "DS-007",
facility_id: 2,
facility_name: "バリューマート北町店",
section_name: "1Fレジ前",
detected_at: at(0, "02:10"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 6,
alert_type: "security_off",
device_serial: "DS-008",
facility_id: 6,
facility_name: "バリューマート南丘駅前店",
section_name: "2F衣料品",
detected_at: at(0, "02:30"),
resolution_status: "in_progress",
responded_at: at(0, "09:10"),
resolved_at: null,
memo: "現場に確認依頼済み",
},
{
id: 7,
alert_type: "disconnected",
device_serial: "DS-009",
facility_id: 8,
facility_name: "メガバリューマート桜台店",
section_name: "1F売り場",
detected_at: at(0, "04:10"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 8,
alert_type: "disconnected",
device_serial: "DS-010",
facility_id: 9,
facility_name: "メガバリューマート三ツ橋中央ショッピングセンター店",
section_name: "B1食品",
detected_at: at(0, "01:30"),
resolution_status: "in_progress",
responded_at: at(0, "08:50"),
resolved_at: null,
memo: "現地ネットワークを確認中",
},
{
id: 9,
alert_type: "security_off",
device_serial: "DS-011",
facility_id: 10,
facility_name: "バリューマート城南店",
section_name: "1Fレジ前",
detected_at: at(1, "02:00"),
resolution_status: "done",
responded_at: at(1, "08:20"),
resolved_at: at(1, "08:30"),
memo: "正常復帰を確認",
},
{
id: 10,
alert_type: "security_off",
device_serial: "DS-012",
facility_id: 12,
facility_name: "メガバリューマート緑野第二店",
section_name: "2F衣料品",
detected_at: at(0, "03:20"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 11,
alert_type: "disconnected",
device_serial: "DS-002",
facility_id: 3,
facility_name: "メガバリューマート東口店",
section_name: "1F売り場",
detected_at: at(2, "02:40"),
resolution_status: "pending",
responded_at: null,
resolved_at: null,
memo: null,
},
{
id: 12,
alert_type: "security_off",
device_serial: "DS-006",
facility_id: 7,
facility_name: "メガバリューマート緑野店",
section_name: "1Fレジ前",
detected_at: at(2, "03:05"),
resolution_status: "in_progress",
responded_at: at(2, "08:00"),
resolved_at: null,
memo: "現場に確認依頼済み",
},
];
/**
* 該当0件(docs/fixtures.md §10)を確認したいときは、
* type=disconnected & status=done を指定してください。
* ★ disconnected × done の組み合わせは意図的に作っていません ★
*/