Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Secrets.json

# globs
Makefile.in
*.userprefs
Expand Down
2 changes: 1 addition & 1 deletion CommBank-Server/CommBank.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="MongoDB.Driver" Version="2.18.0" />
<PackageReference Include="MongoDB.Driver" Version="3.4.2" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions CommBank-Server/Models/Goal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ public class Goal

[BsonRepresentation(BsonType.ObjectId)]
public string? UserId { get; set; }


public string? Icon { get; set; }
}
2 changes: 1 addition & 1 deletion CommBank-Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
builder.Configuration.SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("Secrets.json");

var mongoClient = new MongoClient(builder.Configuration.GetConnectionString("CommBank"));
var mongoDatabase = mongoClient.GetDatabase("CommBank");
var mongoDatabase = mongoClient.GetDatabase("test");

IAccountsService accountsService = new AccountsService(mongoDatabase);
IAuthService authService = new AuthService(mongoDatabase);
Expand Down
5 changes: 0 additions & 5 deletions CommBank-Server/Secrets.json

This file was deleted.

53 changes: 53 additions & 0 deletions CommBank-Server/data/Accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[{
"_id": {
"$oid": "62a3e6aad25715026d1a2938"
},
"Number": 123456789,
"Name": "Tag's Goal Saver",
"Balance": 6483.81,
"AccountType": "GoalSaver",
"TransactionIds": [
{
"$oid": "62a3a284d07648900df72860"
},
{
"$oid": "62a3a2ded07648900df72861"
},
{
"$oid": "62a3a2ded07648900df72862"
},
{
"$oid": "62a3a2ded07648900df72863"
},
{
"$oid": "62a3a2ded07648900df72864"
},
{
"$oid": "62a3a2ded07648900df72865"
},
{
"$oid": "62a3a2ded07648900df72866"
},
{
"$oid": "62a3a2ded07648900df72867"
},
{
"$oid": "62a3a2ded07648900df72868"
},
{
"$oid": "62a3a2ded07648900df72869"
},
{
"$oid": "62a3a344d07648900df7286a"
},
{
"$oid": "62a3a344d07648900df7286b"
},
{
"$oid": "62a3a344d07648900df7286c"
},
{
"$oid": "62a3a344d07648900df7286d"
}
]
}]
50 changes: 50 additions & 0 deletions CommBank-Server/data/Goals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[
{
"_id": { "$oid": "62a3f587102e921da1253d32" },
"Name": "House Down Payment",
"TargetAmount": 100000,
"TargetDate": { "$date": { "$numberLong": "1736312400000" } },
"Balance": 73501.82,
"Created": { "$date": { "$numberLong": "1654912390857" } },
"TransactionIds": null,
"TagIds": null,
"UserId": { "$oid": "62a29c15f4605c4c9fa7f306" },
"Icon": "🤺"
},
{
"_id": { "$oid": "62a3f5e0102e921da1253d33" },
"Name": "Tesla Model Y",
"TargetAmount": 60000,
"TargetDate": { "$date": { "$numberLong": "1662004800000" } },
"Balance": 43840.02,
"Created": { "$date": { "$numberLong": "1654912480950" } },
"TransactionIds": null,
"TagIds": null,
"UserId": { "$oid": "62a29c15f4605c4c9fa7f306" },
"Icon": "🚗"
},
{
"_id": { "$oid": "62a3f62e102e921da1253d34" },
"Name": "Trip to London",
"TargetAmount": 3500,
"TargetDate": { "$date": { "$numberLong": "1659412800000" } },
"Created": { "$date": { "$numberLong": "1654912558236" } },
"TransactionIds": null,
"TagIds": null,
"Balance": 753.89,
"UserId": { "$oid": "62a29c15f4605c4c9fa7f306" },
"Icon": "🎡"
},
{
"_id": { "$oid": "62a61945fa15f1cd18516a5f" },
"Name": "Trip to NYC",
"TargetAmount": 800,
"TargetDate": { "$date": { "$numberLong": "1702184400000" } },
"Balance": 0,
"Created": { "$date": { "$numberLong": "1655053065668" } },
"TransactionIds": null,
"TagIds": null,
"UserId": { "$oid": "62a29c15f4605c4c9fa7f306" },
"Icon": "🗽"
}
]
26 changes: 26 additions & 0 deletions CommBank-Server/data/Tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[{
"_id": {
"$oid": "62a39d27025ca1ba8f1f1c1e"
},
"Name": "Groceries"
},{
"_id": {
"$oid": "62a39d42025ca1ba8f1f1c1f"
},
"Name": "Restaurant"
},{
"_id": {
"$oid": "62a39d4e025ca1ba8f1f1c20"
},
"Name": "Income"
},{
"_id": {
"$oid": "62a39d5a025ca1ba8f1f1c21"
},
"Name": "Gas"
},{
"_id": {
"$oid": "62a39d63025ca1ba8f1f1c22"
},
"Name": "Investment"
}]
Loading