improvement: Message Entity link_type 컬럼 추가 (#74)
All checks were successful
SPMS_API/pipeline/head This commit looks good

Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/75
This commit is contained in:
김선규 2026-02-10 04:14:46 +00:00
commit 59c833e7f7
5 changed files with 914 additions and 0 deletions

View File

@ -8,6 +8,7 @@ public class Message : BaseEntity
public string Body { get; set; } = string.Empty;
public string? ImageUrl { get; set; }
public string? LinkUrl { get; set; }
public string? LinkType { get; set; }
public string? CustomData { get; set; }
public DateTime CreatedAt { get; set; }
public long CreatedBy { get; set; }

View File

@ -0,0 +1,848 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SPMS.Infrastructure;
#nullable disable
namespace SPMS.Infrastructure.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20260210040946_AddMessageLinkType")]
partial class AddMessageLinkType
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("SPMS.Domain.Entities.Admin", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("AdminCode")
.IsRequired()
.HasMaxLength(8)
.HasColumnType("varchar(8)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<bool>("EmailVerified")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<DateTime?>("EmailVerifiedAt")
.HasColumnType("datetime(6)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<DateTime?>("LastLoginAt")
.HasColumnType("datetime(6)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<string>("Phone")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("RefreshToken")
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property<DateTime?>("RefreshTokenExpiresAt")
.HasColumnType("datetime(6)");
b.Property<sbyte>("Role")
.HasColumnType("tinyint");
b.HasKey("Id");
b.HasIndex("AdminCode")
.IsUnique();
b.HasIndex("Email")
.IsUnique();
b.ToTable("Admin", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.DailyStat", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<int>("FailCnt")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("OpenCnt")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("SentCnt")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<DateOnly>("StatDate")
.HasColumnType("date");
b.Property<int>("SuccessCnt")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.HasKey("Id");
b.HasIndex("ServiceId", "StatDate")
.IsUnique();
b.ToTable("DailyStat", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.Device", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime?>("AgreeUpdatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("AppVersion")
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("DeviceModel")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("DeviceToken")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<bool>("MarketingAgreed")
.HasColumnType("tinyint(1)");
b.Property<DateTime?>("MktAgreeUpdatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("OsVersion")
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<sbyte>("Platform")
.HasColumnType("tinyint");
b.Property<bool>("PushAgreed")
.HasColumnType("tinyint(1)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<string>("Tags")
.HasColumnType("json");
b.Property<DateTime?>("UpdatedAt")
.HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("ServiceId", "DeviceToken");
b.ToTable("Device", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.FileEntity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<long>("CreatedBy")
.HasColumnType("bigint");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("FilePath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<long>("FileSize")
.HasColumnType("bigint");
b.Property<string>("FileType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("MimeType")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ServiceId");
b.ToTable("File", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.Message", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Body")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<long>("CreatedBy")
.HasColumnType("bigint");
b.Property<string>("CustomData")
.HasColumnType("json");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("datetime(6)");
b.Property<string>("ImageUrl")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<string>("LinkType")
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("LinkUrl")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<string>("MessageCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("MessageCode")
.IsUnique();
b.HasIndex("ServiceId");
b.ToTable("Message", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.Payment", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<long>("AdminId")
.HasColumnType("bigint");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Currency")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property<DateTime>("PaidAt")
.HasColumnType("datetime(6)");
b.Property<string>("PaymentKey")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("PaymentMethod")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<sbyte>("Status")
.HasColumnType("tinyint");
b.Property<sbyte>("TierAfter")
.HasColumnType("tinyint");
b.Property<sbyte?>("TierBefore")
.HasColumnType("tinyint");
b.HasKey("Id");
b.HasIndex("AdminId");
b.HasIndex("ServiceId");
b.ToTable("Payment", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.PushOpenLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<long>("DeviceId")
.HasColumnType("bigint");
b.Property<long>("MessageId")
.HasColumnType("bigint");
b.Property<DateTime>("OpenedAt")
.HasColumnType("datetime(6)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("DeviceId");
b.HasIndex("MessageId");
b.HasIndex("ServiceId", "OpenedAt");
b.ToTable("PushOpenLog", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.PushSendLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<long>("DeviceId")
.HasColumnType("bigint");
b.Property<string>("FailReason")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<long>("MessageId")
.HasColumnType("bigint");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime(6)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<sbyte>("Status")
.HasColumnType("tinyint");
b.HasKey("Id");
b.HasIndex("DeviceId");
b.HasIndex("MessageId");
b.HasIndex("ServiceId", "SentAt");
b.ToTable("PushSendLog", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.Service", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("ApiKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<DateTime>("ApiKeyCreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("ApnsBundleId")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("ApnsKeyId")
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property<string>("ApnsPrivateKey")
.HasColumnType("text");
b.Property<string>("ApnsTeamId")
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<long>("CreatedBy")
.HasColumnType("bigint");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<string>("FcmCredentials")
.HasColumnType("text");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<string>("ServiceCode")
.IsRequired()
.HasMaxLength(8)
.HasColumnType("varchar(8)");
b.Property<string>("ServiceName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<sbyte>("Status")
.HasColumnType("tinyint");
b.Property<DateTime?>("SubStartedAt")
.HasColumnType("datetime(6)");
b.Property<sbyte>("SubTier")
.HasColumnType("tinyint");
b.Property<string>("Tags")
.HasColumnType("json");
b.Property<DateTime?>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("WebhookUrl")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ServiceCode")
.IsUnique();
b.ToTable("Service", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.ServiceIp", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("IpAddress")
.IsRequired()
.HasMaxLength(45)
.HasColumnType("varchar(45)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("ServiceId");
b.ToTable("ServiceIp", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.SystemLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Action")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<long?>("AdminId")
.HasColumnType("bigint");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("Details")
.HasColumnType("json");
b.Property<string>("IpAddress")
.HasMaxLength(45)
.HasColumnType("varchar(45)");
b.Property<long?>("ServiceId")
.HasColumnType("bigint");
b.Property<long?>("TargetId")
.HasColumnType("bigint");
b.Property<string>("TargetType")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.HasKey("Id");
b.HasIndex("AdminId");
b.HasIndex("CreatedAt");
b.HasIndex("ServiceId");
b.ToTable("SystemLog", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.WebhookLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
b.Property<sbyte>("EventType")
.HasColumnType("tinyint");
b.Property<string>("Payload")
.IsRequired()
.HasColumnType("json");
b.Property<string>("ResponseBody")
.HasColumnType("text");
b.Property<int?>("ResponseCode")
.HasColumnType("int");
b.Property<DateTime>("SentAt")
.HasColumnType("datetime(6)");
b.Property<long>("ServiceId")
.HasColumnType("bigint");
b.Property<sbyte>("Status")
.HasColumnType("tinyint");
b.Property<string>("WebhookUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.HasKey("Id");
b.HasIndex("ServiceId", "SentAt");
b.ToTable("WebhookLog", (string)null);
});
modelBuilder.Entity("SPMS.Domain.Entities.DailyStat", b =>
{
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.Device", b =>
{
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany("Devices")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.FileEntity", b =>
{
b.HasOne("SPMS.Domain.Entities.Admin", "CreatedByAdmin")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("CreatedByAdmin");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.Message", b =>
{
b.HasOne("SPMS.Domain.Entities.Admin", "CreatedByAdmin")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany("Messages")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("CreatedByAdmin");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.Payment", b =>
{
b.HasOne("SPMS.Domain.Entities.Admin", "Admin")
.WithMany()
.HasForeignKey("AdminId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Admin");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.PushOpenLog", b =>
{
b.HasOne("SPMS.Domain.Entities.Device", "Device")
.WithMany()
.HasForeignKey("DeviceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Message", "Message")
.WithMany()
.HasForeignKey("MessageId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Device");
b.Navigation("Message");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.PushSendLog", b =>
{
b.HasOne("SPMS.Domain.Entities.Device", "Device")
.WithMany()
.HasForeignKey("DeviceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Message", "Message")
.WithMany()
.HasForeignKey("MessageId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Device");
b.Navigation("Message");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.Service", b =>
{
b.HasOne("SPMS.Domain.Entities.Admin", "CreatedByAdmin")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("CreatedByAdmin");
});
modelBuilder.Entity("SPMS.Domain.Entities.ServiceIp", b =>
{
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany("ServiceIps")
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.SystemLog", b =>
{
b.HasOne("SPMS.Domain.Entities.Admin", "Admin")
.WithMany()
.HasForeignKey("AdminId")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("Admin");
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.WebhookLog", b =>
{
b.HasOne("SPMS.Domain.Entities.Service", "Service")
.WithMany()
.HasForeignKey("ServiceId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Service");
});
modelBuilder.Entity("SPMS.Domain.Entities.Service", b =>
{
b.Navigation("Devices");
b.Navigation("Messages");
b.Navigation("ServiceIps");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,53 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SPMS.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddMessageLinkType : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LinkType",
table: "Message",
type: "varchar(20)",
maxLength: 20,
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "RefreshToken",
table: "Admin",
type: "varchar(255)",
maxLength: 255,
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<DateTime>(
name: "RefreshTokenExpiresAt",
table: "Admin",
type: "datetime(6)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LinkType",
table: "Message");
migrationBuilder.DropColumn(
name: "RefreshToken",
table: "Admin");
migrationBuilder.DropColumn(
name: "RefreshTokenExpiresAt",
table: "Admin");
}
}
}

View File

@ -77,6 +77,13 @@ namespace SPMS.Infrastructure.Migrations
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("RefreshToken")
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property<DateTime?>("RefreshTokenExpiresAt")
.HasColumnType("datetime(6)");
b.Property<sbyte>("Role")
.HasColumnType("tinyint");
@ -282,6 +289,10 @@ namespace SPMS.Infrastructure.Migrations
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<string>("LinkType")
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("LinkUrl")
.HasMaxLength(500)
.HasColumnType("varchar(500)");

View File

@ -21,6 +21,7 @@ public class MessageConfiguration : IEntityTypeConfiguration<Message>
builder.Property(e => e.Body).HasMaxLength(500).IsRequired();
builder.Property(e => e.ImageUrl).HasMaxLength(500);
builder.Property(e => e.LinkUrl).HasMaxLength(500);
builder.Property(e => e.LinkType).HasMaxLength(20);
builder.Property(e => e.CustomData).HasColumnType("json");
builder.Property(e => e.CreatedAt).IsRequired();
builder.Property(e => e.CreatedBy).IsRequired();