common: add gift card model

This commit is contained in:
Abdullah Atta
2025-04-10 12:20:03 +05:00
parent 11dff4f0cc
commit 0841ca1aa8

View File

@@ -0,0 +1,29 @@
using System.Text.Json.Serialization;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Streetwriters.Common.Interfaces;
namespace Streetwriters.Common.Models
{
public class GiftCard : IDocument
{
public GiftCard()
{
Id = ObjectId.GenerateNewId().ToString();
}
public string Code { get; set; }
public string OrderId { get; set; }
public string OrderIdType { get; set; }
public string ProductId { get; set; }
public string RedeemedBy { get; set; }
public long RedeemedAt { get; set; }
public long Timestamp { get; set; }
public long Term { get; set; }
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
[JsonIgnore]
public string Id { get; set; }
}
}