Summary
Surfaced by the E2E showcase Phase 3 (#522 follow-up). The macro's `detect_type` (rustango-macros/src/lib.rs:6309-6327) only accepts: `i16/i32/i64/f32/f64/bool/String/DateTime/NaiveDate/Uuid/serde_json::Value`. Adding a `Decimal` field fails with:
unsupported field type `Decimal`; v0.1 supports i32/i64/f32/f64/bool/String/DateTime/NaiveDate/Uuid/serde_json::Value, optionally wrapped in Option or Auto (Auto only on integers)
But the framework's `FieldType` enum supports `Decimal`, `Time`, and `Binary` — the dialect compilers emit DDL for them, `bind_match!` binds them, and `row_to_json` decodes them. The macro is the missing link.
Repro
```rust
#[derive(Model)]
#[rustango(table = "x")]
pub struct X {
#[rustango(primary_key)]
pub id: Auto,
pub price: rust_decimal::Decimal, // ← fails
}
```
Workaround
Use `i64` cents (multiply by 100). The showcase's `shop` app does this — `price_cents: i64` instead of `price: Decimal`.
Acceptance
Summary
Surfaced by the E2E showcase Phase 3 (#522 follow-up). The macro's `detect_type` (rustango-macros/src/lib.rs:6309-6327) only accepts: `i16/i32/i64/f32/f64/bool/String/DateTime/NaiveDate/Uuid/serde_json::Value`. Adding a `Decimal` field fails with:
But the framework's `FieldType` enum supports `Decimal`, `Time`, and `Binary` — the dialect compilers emit DDL for them, `bind_match!` binds them, and `row_to_json` decodes them. The macro is the missing link.
Repro
```rust
#[derive(Model)]
#[rustango(table = "x")]
pub struct X {
#[rustango(primary_key)]
pub id: Auto,
pub price: rust_decimal::Decimal, // ← fails
}
```
Workaround
Use `i64` cents (multiply by 100). The showcase's `shop` app does this — `price_cents: i64` instead of `price: Decimal`.
Acceptance