Merge branch 'dev' of https://gitea.nxsir.cn/nanxun/ql_apimanager_backend into dev
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Apimanager_backend.Data;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Models
|
||||
{
|
||||
@@ -57,9 +58,13 @@ namespace Apimanager_backend.Models
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow; // timestamp
|
||||
|
||||
//导航属性
|
||||
[JsonIgnore]
|
||||
public Apipackage? Package { get; set; }
|
||||
public ICollection<ApiPackageItem> ApiPackageItems { get; set; }
|
||||
public ICollection<ApiCallLog> ApiCalls { get; set; }
|
||||
public ICollection<ApiRequestExample> ApiRequestExamples { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<ApiPackageItem>? ApiPackageItems { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<ApiCallLog>? ApiCalls { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<ApiRequestExample>? ApiRequestExamples { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Models
|
||||
{
|
||||
@@ -8,9 +9,10 @@ namespace Apimanager_backend.Models
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ApiPackageId { get; set; }
|
||||
public Apipackage ApiPackage { get; set; } = null!;
|
||||
[JsonIgnore]
|
||||
public Apipackage? ApiPackage { get; set; } = null!;
|
||||
|
||||
public int ApiId { get; set; }
|
||||
public Api Api { get; set; } = null!;
|
||||
public Api? Api { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Models
|
||||
{
|
||||
@@ -45,6 +46,7 @@ namespace Apimanager_backend.Models
|
||||
//导航属性
|
||||
public ICollection<Api> Apis { get; set; }
|
||||
public ICollection<ApiPackageItem> ApiPackageItems { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<UserPackage> Packages { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
{
|
||||
public enum OrderType
|
||||
{
|
||||
Recharge,
|
||||
Purchase,
|
||||
Refund
|
||||
Purchase = 0,
|
||||
Recharge = 1,
|
||||
Refund = 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
AliPay = 0,
|
||||
WxPay = 1,
|
||||
Bank = 2,
|
||||
QQPay =3
|
||||
QQPay =3,
|
||||
balance = 4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Models
|
||||
{
|
||||
@@ -57,9 +58,12 @@ namespace Apimanager_backend.Models
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow; // Timestamp
|
||||
|
||||
//导航属性
|
||||
[JsonIgnore]
|
||||
public ICollection<UserPackage> Packages { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<OperationLog> operationLogs { get; set; }
|
||||
public ICollection<ApiCallLog> CallLogs { get; set; }
|
||||
[JsonIgnore]
|
||||
public ICollection<Order> Orders { get; set; }
|
||||
public ICollection<UserRole> Roles { get; set; } = new List<UserRole>();
|
||||
public User(int id,string username,string email,string passHash)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Apimanager_backend.Models
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Apimanager_backend.Models
|
||||
{
|
||||
public class UserPackage
|
||||
{/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user