Add member identifiers table for ID documents (DL, passport, school ID)
member_identifier table with type, value, issuing authority, expiry, front/back image storage (base64 in Postgres), primary flag. CRUD endpoints under /members/:memberId/identifiers. Zod schemas with constrained type enum.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- Member identity documents (driver's license, passport, school ID, etc.)
|
||||
CREATE TABLE IF NOT EXISTS "member_identifier" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
"member_id" uuid NOT NULL REFERENCES "member"("id"),
|
||||
"company_id" uuid NOT NULL REFERENCES "company"("id"),
|
||||
"type" varchar(50) NOT NULL,
|
||||
"label" varchar(100),
|
||||
"value" varchar(255) NOT NULL,
|
||||
"issuing_authority" varchar(255),
|
||||
"issued_date" date,
|
||||
"expires_at" date,
|
||||
"image_front" text,
|
||||
"image_back" text,
|
||||
"notes" text,
|
||||
"is_primary" boolean NOT NULL DEFAULT false,
|
||||
"created_at" timestamp with time zone NOT NULL DEFAULT now(),
|
||||
"updated_at" timestamp with time zone NOT NULL DEFAULT now()
|
||||
);
|
||||
@@ -71,6 +71,13 @@
|
||||
"when": 1774703400000,
|
||||
"tag": "0009_member_number",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 10,
|
||||
"version": "7",
|
||||
"when": 1774704000000,
|
||||
"tag": "0010_member_identifiers",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user