main
|
Last change
on this file since a4ca79c was a4ca79c, checked in by Georgi Paunkov <paunkovgeorgi@…>, 4 days ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
347 bytes
|
| Line | |
|---|
| 1 | use serde::Serialize;
|
|---|
| 2 | use sqlx::FromRow;
|
|---|
| 3 | use rust_decimal::Decimal;
|
|---|
| 4 |
|
|---|
| 5 | #[derive(Serialize, FromRow)]
|
|---|
| 6 | pub struct Ingredient {
|
|---|
| 7 | pub ingredient_id: i32,
|
|---|
| 8 | pub name: String,
|
|---|
| 9 | pub unit: String,
|
|---|
| 10 | pub current_stock: Decimal,
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | #[derive(Serialize, FromRow)]
|
|---|
| 14 | pub struct RecipeItem {
|
|---|
| 15 | pub ingredient_id: i32,
|
|---|
| 16 | pub quantity_needed: Decimal,
|
|---|
| 17 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.