Skip to content

Commit

Permalink
CardTransactionType.Repair
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbuechele committed Sep 14, 2024
1 parent 1c00077 commit 40c21f6
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1,197 deletions.
4 changes: 3 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ model GmailReminders {
}

model DevicePrivilegeToken {
id Bytes @id
id Bytes @id
label String?
}

model DeviceConfigVersion {
Expand Down Expand Up @@ -347,6 +348,7 @@ enum CardTransactionType {
TopUp
Charge
Cashout
Repair
}

enum DemoEmbedType {
Expand Down
2 changes: 1 addition & 1 deletion src/proto/config.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/proto/configs.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/proto/logmessage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ message LogMessage {
int32 deposit_after = 5;
string card_id = 6;
optional int32 counter = 7;

enum TransactionType {
TOP_UP = 0;
CHARGE = 1;
CASHOUT = 2;
REPAIR = 3;
}
}

message Order {
PaymentMethod payment_method = 1;
repeated CartItem cart_items = 2;
optional int32 list_id = 3;

enum PaymentMethod {
CASH = 0;
BON = 1;
Expand All @@ -41,7 +42,7 @@ message LogMessage {
FREE_BAND = 5;
KULT_CARD = 6;
}

message CartItem {
int32 amount = 1;
Product product = 2;
Expand Down
8 changes: 7 additions & 1 deletion src/proto/logmessage.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/proto/product.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/routes/kultCash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ function mapTransactionType(
return CardTransactionType.Charge;
case LogMessage_CardTransaction_TransactionType.TOP_UP:
return CardTransactionType.TopUp;
case LogMessage_CardTransaction_TransactionType.REPAIR:
return CardTransactionType.Repair;
case LogMessage_CardTransaction_TransactionType.UNRECOGNIZED:
throw new Error('Unrecognized TransactionType');
default:
Expand Down
Loading

0 comments on commit 40c21f6

Please sign in to comment.