StripePurchaseModel constructor

const StripePurchaseModel({
  1. @JsonKey(name: "user") required String userId,
  2. @JsonKey(name: "confirm") @Default(false) bool confirm,
  3. @JsonKey(name: "verify") @Default(false) bool verified,
  4. @JsonKey(name: "capture") @Default(false) bool captured,
  5. @JsonKey(name: "success") @Default(false) bool success,
  6. @JsonKey(name: "cancel") @Default(false) bool canceled,
  7. @JsonKey(name: "error") @Default(false) bool error,
  8. @JsonKey(name: "refund") @Default(false) bool refund,
  9. @JsonKey(name: "orderId") required String orderId,
  10. @JsonKey(name: "purchaseId") required String purchaseId,
  11. @JsonKey(name: "paymentMethodId") required String paymentMethodId,
  12. @JsonKey(name: "customer") required String customerId,
  13. @JsonKey(name: "amount") @Default(0.0) double amount,
  14. @JsonKey(name: "application") String? application,
  15. @JsonKey(name: "applicationFeeAmount") @Default(0.0) double applicationFeeAmount,
  16. @JsonKey(name: "transferAmount") @Default(0.0) double transferAmount,
  17. @JsonKey(name: "transferDistination") @Default("") String transferDistination,
  18. @JsonKey(name: "currency") @Default("jpy") String currency,
  19. @JsonKey(name: "clientSecret") required String clientSecret,
  20. @JsonKey(name: "createdTime") required ModelTimestamp createdTime,
  21. @JsonKey(name: "updatedTime") required ModelTimestamp updatedTime,
  22. @JsonKey(name: "emailFrom") String? emailFrom,
  23. @JsonKey(name: "emailTo") String? emailTo,
  24. @JsonKey(name: "emailTitle") String? emailTitle,
  25. @JsonKey(name: "emailContent") String? emailContent,
  26. @JsonKey(name: "locale") String? locale,
  27. @JsonKey(name: "cancel_at_period_end") @Default(false) bool cancelAtPeriodEnd,
})

Data model for storing Stripe purchase information.

All payments to the operation, payments between users, and subscriptions are stored in this database.

Stripe購入情報を保管するためのデータモデル。

運営への支払い、ユーザー間の支払い、サブスクリプションすべてこのデータベースに保存されます。

Implementation

const factory StripePurchaseModel({
  @JsonKey(name: "user") required String userId,
  @JsonKey(name: "confirm") @Default(false) bool confirm,
  @JsonKey(name: "verify") @Default(false) bool verified,
  @JsonKey(name: "capture") @Default(false) bool captured,
  @JsonKey(name: "success") @Default(false) bool success,
  @JsonKey(name: "cancel") @Default(false) bool canceled,
  @JsonKey(name: "error") @Default(false) bool error,
  @JsonKey(name: "refund") @Default(false) bool refund,
  @JsonKey(name: "orderId") required String orderId,
  @JsonKey(name: "purchaseId") required String purchaseId,
  @JsonKey(name: "paymentMethodId") required String paymentMethodId,
  @JsonKey(name: "customer") required String customerId,
  @JsonKey(name: "amount") @Default(0.0) double amount,
  @JsonKey(name: "application") String? application,
  @JsonKey(name: "applicationFeeAmount")
  @Default(0.0)
  double applicationFeeAmount,
  @JsonKey(name: "transferAmount") @Default(0.0) double transferAmount,
  @JsonKey(name: "transferDistination")
  @Default("")
  String transferDistination,
  @JsonKey(name: "currency") @Default("jpy") String currency,
  @JsonKey(name: "clientSecret") required String clientSecret,
  @JsonKey(name: "createdTime") required ModelTimestamp createdTime,
  @JsonKey(name: "updatedTime") required ModelTimestamp updatedTime,
  @JsonKey(name: "emailFrom") String? emailFrom,
  @JsonKey(name: "emailTo") String? emailTo,
  @JsonKey(name: "emailTitle") String? emailTitle,
  @JsonKey(name: "emailContent") String? emailContent,
  @JsonKey(name: "locale") String? locale,
  @JsonKey(name: "cancel_at_period_end")
  @Default(false)
  bool cancelAtPeriodEnd,
}) = _StripePurchaseModel;