Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
823 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,61 @@ | ||
using System.Text.Json.Serialization; | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="Address.cs" company="Kvesic, Matkovic, FSRE"> | ||
// Copyright (c) Kvesic, Matkovic, FSRE. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace MauiStoreApp.Models | ||
{ | ||
/// <summary> | ||
/// Represents an address. | ||
/// </summary> | ||
public class Address | ||
{ | ||
/// <summary> | ||
/// Gets or sets the geolocation of the address. | ||
/// </summary> | ||
[JsonPropertyName("geolocation")] | ||
public Geolocation Geolocation { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the city of the address. | ||
/// </summary> | ||
[JsonPropertyName("city")] | ||
public string City { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the street of the address. | ||
/// </summary> | ||
[JsonPropertyName("street")] | ||
public string Street { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the number of the address. | ||
/// </summary> | ||
[JsonPropertyName("number")] | ||
public int Number { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the zipcode of the address. | ||
/// </summary> | ||
[JsonPropertyName("zipcode")] | ||
public string Zipcode { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the city with the first letter capitalized. | ||
/// </summary> | ||
public string CityCapitalized => $"{City?.ToUpper()[0]}{City?.ToLower()[1..]}"; | ||
|
||
/// <summary> | ||
/// Gets the city and zipcode concatenated. | ||
/// </summary> | ||
public string CityAndZipcode => $"{CityCapitalized} {Zipcode}"; | ||
|
||
/// <summary> | ||
/// Gets the full street with the first letter capitalized followed by the street number. | ||
/// </summary> | ||
public string FullStreet => $"{Street?.ToUpper()[0]}{Street?.ToLower()[1..]} {Number}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
using System.Text.Json.Serialization; | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="LoginResponse.cs" company="Kvesic, Matkovic, FSRE"> | ||
// Copyright (c) Kvesic, Matkovic, FSRE. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace MauiStoreApp.Models | ||
{ | ||
/// <summary> | ||
/// Represents the response from a login attempt, including an authentication token and user ID. | ||
/// </summary> | ||
public class LoginResponse | ||
{ | ||
/// <summary> | ||
/// Gets or sets the authentication token for the user. | ||
/// </summary> | ||
[JsonPropertyName("token")] | ||
public string Token { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the user ID. | ||
/// </summary> | ||
[JsonPropertyName("userId")] | ||
public int UserId { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.