a blog index

This commit is contained in:
Paul Schneider
2023-04-01 15:03:48 +01:00
parent 2562c9a569
commit 02d80795ca
10 changed files with 47 additions and 45 deletions

View File

@ -72,8 +72,8 @@ namespace Yavsc.Models
/// Billing postal address
/// </summary>
/// <returns></returns>
[ForeignKeyAttribute("PostalAddressId")]
public virtual Location PostalAddress { get; set; }
[ForeignKey("PostalAddressId")]
public virtual Location? PostalAddress { get; set; }
public long? PostalAddressId { get; set; }
/// <summary>
@ -88,7 +88,7 @@ namespace Yavsc.Models
return this.Id + " " + this.AccountBalance?.Credits.ToString() + this.Email + " " + this.UserName + " $" + this.AccountBalance?.Credits.ToString();
}
public BankIdentity BankInfo { get; set; }
public virtual List<BankIdentity> BankInfo { get; set; }
public long DiskQuota { get; set; } = 512 * 1024 * 1024;
public long DiskUsage { get; set; } = 0;

View File

@ -58,7 +58,22 @@ namespace Yavsc.Models.Bank
[DisplayName("Clé RIB")]
public int BankedKey { get; set; }
public virtual ApplicationUser User { get; set; }
public string UserId { get; set; }
public override bool Equals(object? obj)
{
if (obj==null) return false;
if (! typeof(BankIdentity).IsAssignableFrom(obj.GetType())) return false;
BankIdentity tobj = (BankIdentity)obj;
return tobj.IBAN == IBAN &&
tobj.BIC == BIC &&
tobj.AccountNumber == AccountNumber &&
tobj.BankedKey == BankedKey;
}
}
}
}