summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-24 21:26:33 +0300
committereug-vs <eug-vs@keemail.me>2021-04-24 21:26:33 +0300
commit5cba4b888ce86350b306bd65e7929e9a4f146b01 (patch)
treed5262db150ca3158ffa9f33e7691f7e53337620f /src/models
parent0bc7ef4bd32e5e65db502eec63f9723f345a66d7 (diff)
downloadcommercel-api-5cba4b888ce86350b306bd65e7929e9a4f146b01.tar.gz
feat: add currency to account
Diffstat (limited to 'src/models')
-rw-r--r--src/models/account/account.schema.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/account/account.schema.ts b/src/models/account/account.schema.ts
index 3ce3983..732ccc7 100644
--- a/src/models/account/account.schema.ts
+++ b/src/models/account/account.schema.ts
@@ -4,6 +4,7 @@ export interface AccountSchema extends Document {
name: string;
code: string;
balance: number;
+ currency: 'BYN' | 'USD' | 'EUR';
}
export const accountSchema = new Schema({
@@ -19,5 +20,9 @@ export const accountSchema = new Schema({
type: Number,
default: 0,
},
+ currency: {
+ type: String,
+ default: 'BYN'
+ },
}, { timestamps: true });