language version degraded to 9.0

This commit is contained in:
2022-02-25 13:38:42 +08:00
parent 9a6011c3d8
commit e012110b00
32 changed files with 1287 additions and 1262 deletions

View File

@ -1,34 +1,35 @@
using System;
using System.Xml.Linq;
namespace Billing.Models;
public class Billing : BaseModel
namespace Billing.Models
{
public decimal Amount { get; set; }
public string Name { get; set; }
public int CategoryId { get; set; }
public int WalletId { get; set; }
public string Store { get; set; }
public DateTime CreateTime { get; set; }
public override void OnXmlDeserialize(XElement node)
public class Billing : BaseModel
{
Amount = Read(node, nameof(Amount), 0m);
Name = Read(node, nameof(Name), string.Empty);
CategoryId = Read(node, nameof(CategoryId), -1);
WalletId = Read(node, nameof(WalletId), -1);
Store = Read(node, nameof(Store), string.Empty);
CreateTime = Read(node, nameof(CreateTime), default(DateTime));
}
public decimal Amount { get; set; }
public string Name { get; set; }
public int CategoryId { get; set; }
public int WalletId { get; set; }
public string Store { get; set; }
public DateTime CreateTime { get; set; }
public override void OnXmlSerialize(XElement node)
{
Write(node, nameof(Amount), Amount);
Write(node, nameof(Name), Name);
Write(node, nameof(CategoryId), CategoryId);
Write(node, nameof(WalletId), WalletId);
Write(node, nameof(Store), Store);
Write(node, nameof(CreateTime), CreateTime);
public override void OnXmlDeserialize(XElement node)
{
Amount = Read(node, nameof(Amount), 0m);
Name = Read(node, nameof(Name), string.Empty);
CategoryId = Read(node, nameof(CategoryId), -1);
WalletId = Read(node, nameof(WalletId), -1);
Store = Read(node, nameof(Store), string.Empty);
CreateTime = Read(node, nameof(CreateTime), default(DateTime));
}
public override void OnXmlSerialize(XElement node)
{
Write(node, nameof(Amount), Amount);
Write(node, nameof(Name), Name);
Write(node, nameof(CategoryId), CategoryId);
Write(node, nameof(WalletId), WalletId);
Write(node, nameof(Store), Store);
Write(node, nameof(CreateTime), CreateTime);
}
}
}
}