using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace Iceshrimp.Backend.Core.Database.Tables; [Table("clip")] [Index("UserId")] public class Clip { [Key] [Column("id")] [StringLength(32)] public string Id { get; set; } = null!; /// /// The created date of the Clip. /// [Column("createdAt")] public DateTime CreatedAt { get; set; } /// /// The owner ID. /// [Column("userId")] [StringLength(32)] public string UserId { get; set; } = null!; /// /// The name of the Clip. /// [Column("name")] [StringLength(128)] public string Name { get; set; } = null!; [Column("isPublic")] public bool IsPublic { get; set; } /// /// The description of the Clip. /// [Column("description")] [StringLength(2048)] public string? Description { get; set; } [InverseProperty(nameof(ClipNote.Clip))] public virtual ICollection ClipNotes { get; set; } = new List(); [ForeignKey("UserId")] [InverseProperty(nameof(Tables.User.Clips))] public virtual User User { get; set; } = null!; }