using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Apimanager_backend.Models { public class Apipackage { /// /// 主键,自增 /// [Key] public int Id { get; set; } /// /// 套餐名称 /// [MaxLength(20)] public string Name { get; set; } // varchar(20) /// /// 最大调用次数 /// public int CallLimit { get; set; } // int /// /// 价格 /// public decimal Price { get; set; } // decimal(10,2) /// /// 每分钟调用次数限制 /// public int OneMinuteLimit { get; set; } /// /// 创建时间 /// public DateTime CreatedAt { get; set; } = DateTime.UtcNow; // timestamp /// /// 是否删除 /// public bool IsDeleted { get; set; } = false; //导航属性 public ICollection Apis { get; set; } public ICollection ApiPackageItems { get; set; } [JsonIgnore] public ICollection Packages { get; set; } } }