blob: 8148f8124ea75d0b82f4e11fbd5102fcf9f01ec0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System.Net;
namespace WhatApi.Database.Tables;
public class Content : BaseAuditableEntity
{
public Guid Id { get; set; }
public required string Mime { get; set; }
public Guid BlobId { get; set; }
public required IPAddress Ip { get; set; }
}
public class ContentConfiguration : IEntityTypeConfiguration<Content>
{
public void Configure(EntityTypeBuilder<Content> builder) {
builder.HasKey(x => x.Id);
builder.Property(x => x.Mime).HasMaxLength(100).IsRequired();
builder.ToTable("content");
}
}
|