60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FutureMailAPI.Models
|
|
{
|
|
public class TimeCapsule
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public int UserId { get; set; }
|
|
|
|
[Required]
|
|
public int SentMailId { get; set; }
|
|
|
|
// 胶囊位置信息(X, Y, Z坐标)
|
|
public double PositionX { get; set; }
|
|
public double PositionY { get; set; }
|
|
public double PositionZ { get; set; }
|
|
|
|
// 胶囊大小
|
|
public double Size { get; set; } = 1.0;
|
|
|
|
// 胶囊颜色
|
|
[MaxLength(20)]
|
|
public string? Color { get; set; }
|
|
|
|
// 胶囊透明度
|
|
public double Opacity { get; set; } = 1.0;
|
|
|
|
// 胶囊旋转角度
|
|
public double Rotation { get; set; } = 0;
|
|
|
|
// 胶囊样式/皮肤
|
|
[MaxLength(50)]
|
|
public string? Style { get; set; }
|
|
|
|
// 发光强度
|
|
public double GlowIntensity { get; set; } = 0.8;
|
|
|
|
// 胶囊状态: 0-未激活, 1-漂浮中, 2-即将到达, 3-已开启
|
|
[Required]
|
|
public int Status { get; set; } = 0;
|
|
|
|
// 胶囊类型: 0-普通, 1-特殊, 2-限时
|
|
[Required]
|
|
public int Type { get; set; } = 0;
|
|
|
|
// 创建时间
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
// 导航属性
|
|
[ForeignKey("UserId")]
|
|
public virtual User User { get; set; } = null!;
|
|
|
|
[ForeignKey("SentMailId")]
|
|
public virtual SentMail SentMail { get; set; } = null!;
|
|
}
|
|
} |