Add acquisition persistence, cost-basis calculation, seller-scoped admin routes, contracts, validation, migration, and focused application/HTTP tests.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
CREATE TABLE "acquisitions" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"inventory_item_id" uuid NOT NULL REFERENCES "inventory_items"("id"),
|
||||
"method" text NOT NULL,
|
||||
"cost_minor" integer NOT NULL,
|
||||
"currency" text NOT NULL,
|
||||
"date" text,
|
||||
"source" text,
|
||||
"location" text,
|
||||
"shipping_minor" integer DEFAULT 0 NOT NULL,
|
||||
"tax_minor" integer DEFAULT 0 NOT NULL,
|
||||
"other_fees_minor" integer DEFAULT 0 NOT NULL,
|
||||
"estimated_trade_value_minor" integer DEFAULT 0 NOT NULL,
|
||||
"notes" text,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX "acquisitions_inventory_item_id_index" ON "acquisitions" USING btree ("inventory_item_id");
|
||||
@@ -99,6 +99,13 @@
|
||||
"when": 1789718400000,
|
||||
"tag": "0013_void_sales",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 14,
|
||||
"version": "7",
|
||||
"when": 1789804800000,
|
||||
"tag": "0014_acquisitions",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user