feat(links): add models

This commit is contained in:
2026-01-27 14:34:05 -05:00
parent fe0686050d
commit bc1ce0bbaa
7 changed files with 889 additions and 0 deletions

28
src/api/Models/Event.cs Normal file
View File

@@ -0,0 +1,28 @@
namespace Api.Models;
public enum EventType
{
Click,
Scan
}
public class Event
{
public long Id { get; set; }
public Guid WorkspaceId { get; set; }
public Guid ShortLinkId { get; set; }
public Guid? QRCodeId { get; set; }
public EventType Type { get; set; }
public DateTime Timestamp { get; set; }
public string? IpHash { get; set; }
public string? UserAgent { get; set; }
public string? Referrer { get; set; }
public string? CountryCode { get; set; }
public string? DeviceType { get; set; }
public string? DedupeKey { get; set; }
// Navigation properties
public Workspace Workspace { get; set; } = null!;
public ShortLink ShortLink { get; set; } = null!;
public QRCodeDesign? QRCode { get; set; }
}