Add another checkout table
This commit is contained in:
parent
592f157225
commit
379910081a
@ -45,6 +45,7 @@ impl MigrationTrait for Migration {
|
|||||||
drop_type!(m, crate::types::OrderItemChangeType);
|
drop_type!(m, crate::types::OrderItemChangeType);
|
||||||
drop_type!(m, crate::types::PaymentCollectionType);
|
drop_type!(m, crate::types::PaymentCollectionType);
|
||||||
drop_type!(m, crate::types::OrderFulfillmentStatus);
|
drop_type!(m, crate::types::OrderFulfillmentStatus);
|
||||||
|
drop_type!(m, crate::types::PaymentCollectionStatus);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,6 +57,7 @@ impl Migration {
|
|||||||
create_type!(m, crate::types::OrderItemChangeType);
|
create_type!(m, crate::types::OrderItemChangeType);
|
||||||
create_type!(m, crate::types::PaymentCollectionType);
|
create_type!(m, crate::types::PaymentCollectionType);
|
||||||
create_type!(m, crate::types::OrderFulfillmentStatus);
|
create_type!(m, crate::types::OrderFulfillmentStatus);
|
||||||
|
create_type!(m, crate::types::PaymentCollectionStatus);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
/// ```sql
|
/// ```sql
|
||||||
@ -316,12 +318,26 @@ impl Migration {
|
|||||||
.col(ts_def_now_not_null!(PaymentCollection::CreatedAt))
|
.col(ts_def_now_not_null!(PaymentCollection::CreatedAt))
|
||||||
.col(ts_def_now_not_null!(PaymentCollection::UpdatedAt))
|
.col(ts_def_now_not_null!(PaymentCollection::UpdatedAt))
|
||||||
.col(PaymentCollection::DeletedAt.col().timestamp())
|
.col(PaymentCollection::DeletedAt.col().timestamp())
|
||||||
.col(PaymentCollection::Type.col().enumeration(crate::types::PaymentCollectionType::PaymentCollectionTypes, crate::types::PaymentCollectionType::iter().skip(1)))
|
.col(PaymentCollection::PaymentCollectionType.col().enumeration(
|
||||||
////////
|
crate::types::PaymentCollectionType::PaymentCollectionTypes,
|
||||||
//////// TODO
|
crate::types::PaymentCollectionType::iter().skip(1),
|
||||||
//////// TODO
|
))
|
||||||
//////// TODO
|
.col(
|
||||||
////////
|
PaymentCollection::Status
|
||||||
|
.col()
|
||||||
|
.enumeration(
|
||||||
|
crate::types::PaymentCollectionStatus::PaymentCollectionStatuses,
|
||||||
|
crate::types::PaymentCollectionStatus::iter().skip(1),
|
||||||
|
)
|
||||||
|
.not_null(),
|
||||||
|
)
|
||||||
|
.col(PaymentCollection::Description.col().string())
|
||||||
|
.col(PaymentCollection::Amount.col().integer().not_null())
|
||||||
|
.col(PaymentCollection::AuthorizedAmount.col().integer())
|
||||||
|
.col(PaymentCollection::RegionId.col().uuid().not_null())
|
||||||
|
.col(PaymentCollection::CurrencyCode.col().string().not_null())
|
||||||
|
.col(PaymentCollection::Metadata.col().json_binary())
|
||||||
|
.col(PaymentCollection::CreatedBy.col().uuid().not_null())
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
@ -530,7 +546,7 @@ pub enum PaymentCollection {
|
|||||||
CreatedAt,
|
CreatedAt,
|
||||||
UpdatedAt,
|
UpdatedAt,
|
||||||
DeletedAt,
|
DeletedAt,
|
||||||
Type,
|
PaymentCollectionType,
|
||||||
Status,
|
Status,
|
||||||
Description,
|
Description,
|
||||||
Amount,
|
Amount,
|
||||||
|
Loading…
Reference in New Issue
Block a user