[package]
name = "common-contracts"
version = "0.1.0"
edition = "2024"
description = "Shared strongly-typed contracts (models, DTOs, messages, observability) across services."
authors = ["Lv, Qi <lvsoft@gmail.com>"]

[lib]
name = "common_contracts"
path = "src/lib.rs"

[features]
default = ["persistence"]
persistence = ["dep:sqlx"]

[dependencies]
async-trait = "0.1.89"
async-nats = "0.45.0"
anyhow = "1.0"
tracing = "0.1"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["serde", "v4"] }
rust_decimal = { version = "1.36", features = ["serde"] }
utoipa = { version = "5.4", features = ["chrono", "uuid"] }
sqlx = { version = "0.8.6", features = [ "runtime-tokio-rustls", "postgres", "chrono", "uuid", "json", "rust_decimal" ], optional = true }
service_kit = { version = "0.1.2" }
reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["time", "sync", "macros"] }
log = "0.4"
