Converting server to dotnet

This commit is contained in:
Zeeshaun
2026-05-05 16:22:37 +00:00
parent 74d2170880
commit 095eb4b50d
21 changed files with 636 additions and 296 deletions
+40
View File
@@ -0,0 +1,40 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace RanazePos.Api.Models;
public sealed class MenuItemDocument
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
[JsonPropertyName("_id")]
public string? Id { get; set; }
[BsonElement("name")]
[JsonPropertyName("name")]
public required string Name { get; set; }
[BsonElement("category")]
[JsonPropertyName("category")]
public required string Category { get; set; }
[BsonElement("description")]
[JsonPropertyName("description")]
public string Description { get; set; } = "";
[BsonElement("basePrice")]
[BsonRepresentation(BsonType.Decimal128)]
[JsonPropertyName("basePrice")]
public decimal BasePrice { get; set; }
[BsonElement("createdAt")]
[BsonDateTimeOptions(Kind = DateTimeKind.Utc)]
[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; set; }
[BsonElement("updatedAt")]
[BsonDateTimeOptions(Kind = DateTimeKind.Utc)]
[JsonPropertyName("updatedAt")]
public DateTime UpdatedAt { get; set; }
}