Set order account id as optional
This commit is contained in:
parent
9b1e95fe81
commit
fd2afc6ae9
@ -239,7 +239,9 @@ WHERE id = $1
|
|||||||
#[derive(actix::Message)]
|
#[derive(actix::Message)]
|
||||||
#[rtype(result = "Result<Order>")]
|
#[rtype(result = "Result<Order>")]
|
||||||
pub struct SetOrderServiceId {
|
pub struct SetOrderServiceId {
|
||||||
|
/// Internal order id
|
||||||
pub id: OrderId,
|
pub id: OrderId,
|
||||||
|
/// Payment external service id
|
||||||
pub service_order_id: String,
|
pub service_order_id: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ impl From<(crate::Order, Vec<crate::OrderItem>)> for Order {
|
|||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct Order {
|
pub struct Order {
|
||||||
pub id: crate::OrderId,
|
pub id: crate::OrderId,
|
||||||
pub buyer_id: crate::AccountId,
|
pub buyer_id: Option<crate::AccountId>,
|
||||||
pub status: crate::OrderStatus,
|
pub status: crate::OrderStatus,
|
||||||
pub items: Vec<crate::OrderItem>,
|
pub items: Vec<crate::OrderItem>,
|
||||||
pub checkout_notes: Option<String>,
|
pub checkout_notes: Option<String>,
|
||||||
|
@ -934,11 +934,17 @@ impl ExtOrderId {
|
|||||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Order {
|
pub struct Order {
|
||||||
pub id: OrderId,
|
pub id: OrderId,
|
||||||
pub buyer_id: AccountId,
|
/// Optional customer account id
|
||||||
|
pub buyer_id: Option<AccountId>,
|
||||||
|
/// Order status
|
||||||
pub status: OrderStatus,
|
pub status: OrderStatus,
|
||||||
|
/// ID send to external payment service as an identifier
|
||||||
pub order_ext_id: uuid::Uuid,
|
pub order_ext_id: uuid::Uuid,
|
||||||
|
/// ID received from external payment service as an identifier
|
||||||
pub service_order_id: Option<String>,
|
pub service_order_id: Option<String>,
|
||||||
|
/// Optional notes given by customer
|
||||||
pub checkout_notes: Option<String>,
|
pub checkout_notes: Option<String>,
|
||||||
|
/// Delivery address
|
||||||
pub address_id: OrderAddressId,
|
pub address_id: OrderAddressId,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -947,7 +953,7 @@ pub struct Order {
|
|||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct PublicOrder {
|
pub struct PublicOrder {
|
||||||
pub id: OrderId,
|
pub id: OrderId,
|
||||||
pub buyer_id: AccountId,
|
pub buyer_id: Option<AccountId>,
|
||||||
pub status: OrderStatus,
|
pub status: OrderStatus,
|
||||||
pub checkout_notes: String,
|
pub checkout_notes: String,
|
||||||
pub address_id: OrderAddressId,
|
pub address_id: OrderAddressId,
|
||||||
|
Loading…
Reference in New Issue
Block a user