From 57e24fc18a8b623a34a8f9e84b2929592f2fd80c Mon Sep 17 00:00:00 2001 From: avicenan Date: Thu, 28 May 2026 11:35:33 +0900 Subject: [PATCH] feat(card-key): add new card key sets config --- src/entity/card_key_sets.ts | 52 +++++++++++++++++++++++++++++++++++++ src/schema/public.ts | 1 + 2 files changed, 53 insertions(+) create mode 100644 src/entity/card_key_sets.ts diff --git a/src/entity/card_key_sets.ts b/src/entity/card_key_sets.ts new file mode 100644 index 0000000..0d04616 --- /dev/null +++ b/src/entity/card_key_sets.ts @@ -0,0 +1,52 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from "typeorm"; + +@Entity("card_key_sets") +export class CardKeySet { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + unique: true, + length: 256, + }) + key_set_id: string; + + @Column({ + nullable: true, + type: "text", + }) + app_master_key: string; + + @Column({ + nullable: true, + type: "text", + }) + read_basic_key: string; + + @Column({ + nullable: true, + type: "text", + }) + write_update_key: string; + + @Column({ + nullable: true, + type: "text", + }) + read_sensitive_key: string; + + @Column({ + nullable: true, + type: "boolean", + }) + is_active: boolean; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; +} diff --git a/src/schema/public.ts b/src/schema/public.ts index 572bd1c..a5fd1c7 100644 --- a/src/schema/public.ts +++ b/src/schema/public.ts @@ -59,6 +59,7 @@ export * from "../entity/counter"; export * from "../entity/room_number"; export * from "../entity/medical_form"; export * from "../entity/main_disease"; +export * from "../entity/card_key_sets"; export * from "../types/public"; export * from "../types/action";