18 Commits
Author SHA1 Message Date
zhongqin be1738d29f refactor(types): type-driven SnowflakeId & Price across all layers
Both wire-format concerns are now enforced by the type system via serde,
eliminating manual conversions at every layer:

SnowflakeId (id encryption on the wire):
- All DTO id fields use SnowflakeId instead of String; serialization emits
  encode_id (cipher+base62 under ID_ENCODING), deserialization accepts both
  forms and rejects garbage with 400
- Services/models pass SnowflakeId through; parse_id only remains at
  untyped boundaries (Path<String>/Query/batch ids)
- utoipa PartialSchema/ToSchema impls added; reader ecommerce permissions
  seeded (cart/orders/product_comments/favorites) across all 3 schemas
- reserved_usernames site option (data-driven, 4-128 charset validation)

Price (money wire format is yuan):
- New Price type (sqlx-transparent over i64 cents) with yuan serde,
  arithmetic ops, checked helpers, DbBigint coercion for CRUD macros
- Models/commands/DTOs across product/variant/cart/order/payment/coupon/
  wallet/shipping/favorites all use Price; arithmetic stays integer cents
- Admin submits yuan, storefront formatPrice only adds the currency symbol
- Fix coupon Fixed-discount semantics (discount capped at order amount)

AGENTS.md documents both conventions.
2026-08-19 13:48:27 +08:00
zhongqin 15db0fa2d1 chore(release-sdk): expect main as local branch 2026-08-18 20:23:25 +08:00
zhongqin d6620f904f update readme 2026-08-17 20:40:04 +08:00
zhongqin 66dc90fc36 feat: add content-types backup scripts, update user remvoe logic 2026-08-13 23:00:06 +08:00
zhongqin b1535c0fee improve github workflows 2026-08-11 19:27:18 +08:00
zhongqin 89a60240f4 feat: update export types 2026-08-11 15:46:51 +08:00
zhongqin fbd50d7232 fix: resolve test error 2026-08-11 07:22:34 +08:00
zhongqin ef236d9f1c feat: improve content tyeps medis and blob field 2026-08-04 15:02:46 +08:00
zhongqin db361f262c feat: improve mcp structure 2026-08-03 09:49:45 +08:00
zhongqin d2b49505fb feat: refactoring project directory structure using workspace 2026-08-02 21:57:59 +08:00
zhongqin 22ba37db74 major update, product posts payment and detail improve 2026-06-10 05:38:45 +08:00
zhongqin da8f1a4df5 improve ci workflow 2026-05-23 08:36:41 +08:00
zhongqin 8245df8747 optimize the release process 2026-05-23 00:36:39 +08:00
zhongqin 6bca73f06d extreme performance optimization 2026-05-05 20:59:45 +08:00
zhongqin 33a553c329 change the project to official name 2026-05-04 00:27:51 +08:00
zhongqin 93e8680550 update plugin sdk 2026-05-03 16:23:37 +08:00
zhongqin 581fe34f63 improve plugin sdk 2026-05-03 16:13:03 +08:00
zhongqin f7b8163fce performance optimization and wasm plugin refactor 2026-04-20 15:39:06 +08:00