43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace QRRapidoApp.Models
|
|
{
|
|
public class Rating
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
[BsonElement("rating")]
|
|
public int RatingValue { get; set; } // 1-5 stars
|
|
|
|
[BsonElement("name")]
|
|
public string? Name { get; set; }
|
|
|
|
[BsonElement("email")]
|
|
public string? Email { get; set; }
|
|
|
|
[BsonElement("comment")]
|
|
public string? Comment { get; set; }
|
|
|
|
[BsonElement("url")]
|
|
public string Url { get; set; } = string.Empty;
|
|
|
|
[BsonElement("userAgent")]
|
|
public string UserAgent { get; set; } = string.Empty;
|
|
|
|
[BsonElement("userId")]
|
|
public string? UserId { get; set; } // If authenticated
|
|
|
|
[BsonElement("createdAt")]
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
[BsonElement("ipAddress")]
|
|
public string? IpAddress { get; set; }
|
|
|
|
[BsonElement("culture")]
|
|
public string Culture { get; set; } = "pt-BR";
|
|
}
|
|
}
|