Merge branch 'feature-nxdev' of https://gitea.nxsir.cn/code/IM into feature-nxdev

This commit is contained in:
2025-10-30 14:44:00 +08:00
47 changed files with 1140 additions and 696 deletions
+2 -20
View File
@@ -1,59 +1,41 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace IM_API.Models;
[Table("files")]
[Index("Messageld", Name = "Messageld")]
[MySqlCharSet("utf8mb4")]
[MySqlCollation("utf8mb4_general_ci")]
public partial class File
{
[Key]
[Column("ID", TypeName = "int(11)")]
public int Id { get; set; }
/// <summary>
/// 文件名
/// </summary>
[StringLength(50)]
public string Name { get; set; } = null!;
/// <summary>
/// 文件储存URL
/// </summary>
[Column("URL")]
[StringLength(100)]
public string Url { get; set; } = null!;
/// <summary>
/// 文件大小(单位:KB
/// </summary>
[Column(TypeName = "int(11)")]
public int Size { get; set; }
/// <summary>
/// 文件类型
/// </summary>
[StringLength(10)]
public string Type { get; set; } = null!;
/// <summary>
/// 关联消息ID
/// </summary>
[Column(TypeName = "int(11)")]
public int Messageld { get; set; }
public int MessageId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column(TypeName = "datetime")]
public DateTime Created { get; set; }
[ForeignKey("Messageld")]
[InverseProperty("Files")]
public virtual Message MessageldNavigation { get; set; } = null!;
public virtual Message Message { get; set; } = null!;
}