Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c50acc309 |
@@ -61,14 +61,14 @@ namespace SimApi.Configs
|
||||
/// <summary>
|
||||
/// Swagger文档相关配置,需要启用 EnableSimApiDoc
|
||||
/// </summary>
|
||||
public SimApiDocOptions SimApiDocOptions { get; set; } = new SimApiDocOptions();
|
||||
public SimApiDocOptions SimApiDocOptions { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// S3兼容的存储系统配置,需要启用 EnableSimApiStorage
|
||||
/// </summary>
|
||||
public SimApiStorageOptions SimApiStorageOptions { get; set; } = new SimApiStorageOptions();
|
||||
public SimApiStorageOptions SimApiStorageOptions { get; set; } = new();
|
||||
|
||||
public SimApiSynapseOptions SimApiSynapseOptions { get; set; } = new SimApiSynapseOptions();
|
||||
public SimApiSynapseOptions SimApiSynapseOptions { get; set; } = new();
|
||||
|
||||
public void ConfigureSimApiSynapse(Action<SimApiSynapseOptions> options = null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using SimApi.Helpers;
|
||||
@@ -7,10 +8,16 @@ namespace SimApi.Models
|
||||
{
|
||||
public class SimApiBaseModel
|
||||
{
|
||||
protected virtual string[] MapperIgnoreField { get; set; } =
|
||||
{
|
||||
"Id", "CreatedAt", "UpdatedAt"
|
||||
};
|
||||
[Column(Order = 1)]
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
|
||||
[Column(Order = 9998)]
|
||||
public DateTime UpdatedAt { get; set; } = SimApiUtil.CstNow;
|
||||
|
||||
[Column(Order = 9999)]
|
||||
public DateTime CreatedAt { get; set; } = SimApiUtil.CstNow;
|
||||
|
||||
protected virtual string[] MapperIgnoreField { get; set; } = { "Id", "CreatedAt", "UpdatedAt" };
|
||||
|
||||
protected virtual string UpdatedTimeField { get; set; } = "UpdatedAt";
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
<SynchReleaseVersion>false</SynchReleaseVersion>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageVersion>5.0.2</PackageVersion>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user