Skip to content

Commit

Permalink
Create transfer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored May 10, 2024
1 parent b6c1ce5 commit 6ec06f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/models/transfer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const mongoose = require("mongoose");

const transferSchema = new mongoose.Schema({
sender_id: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: true },
receiver_account_id: { type: String, required: true },
amount: { type: Number, required: true },
transaction_hash: { type: String },
});

const Transfer = mongoose.model("Transfer", transferSchema);

module.exports = Transfer;

0 comments on commit 6ec06f1

Please sign in to comment.