back photo + event tags and persons

This commit is contained in:
2025-08-10 20:07:40 +02:00
parent 0cc8bddfa1
commit f61b48fa4b
46 changed files with 1438 additions and 189 deletions

View File

@@ -0,0 +1,52 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace back.DataModels;
[Table("Events")]
public class EventModel
{
[Key]
public string Id { get; set; }
[Required, MaxLength(50)]
public string? Title { get; set; }
[MaxLength(500)]
public string? Description { get; set; }
public DateTime? Date { get; set; }
public string? Location { get; set; }
public List<TagModel> RelatedTags { get; set; } = [];
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public string? CreatedBy { get; set; }
public string? UpdatedBy { get; set; }
public EventModel(string id)
{
Id = id;
}
public EventModel(
string id,
string title,
string description,
DateTime date,
string location,
List<TagModel>? relatedTags = null,
DateTime? createdAt = null,
DateTime? updatedAt = null,
string? createdBy = null,
string? updatedBy = null)
{
Id = id;
Title = title;
Description = description;
Date = date;
Location = location;
RelatedTags = relatedTags ?? [];
CreatedAt = createdAt ?? DateTime.UtcNow;
UpdatedAt = updatedAt ?? DateTime.UtcNow;
CreatedBy = createdBy ?? "";
UpdatedBy = updatedBy;
}
}