35 lines
850 B
C#
35 lines
850 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace demo0411.Models;
|
|
|
|
public partial class Product
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
public int? TypeId { get; set; }
|
|
|
|
public string? Name { get; set; }
|
|
|
|
public float? MinCost { get; set; }
|
|
//public string BackgroundColor
|
|
//{
|
|
// get
|
|
// {
|
|
// switch (PartnerProducts.Where(a => a.SaleDate.Value.Year == 2024).Select(c => c.Amount).Sum())
|
|
// {
|
|
// case < 10000: return "Red";
|
|
// case < 60000: return "Orange";
|
|
// case >= 60000: return "Green";
|
|
// }
|
|
// return "#F4E8D3";
|
|
// }
|
|
//}
|
|
|
|
|
|
public virtual ICollection<PartnerProduct> PartnerProducts { get; set; } = new List<PartnerProduct>();
|
|
|
|
public virtual ProductType? Type { get; set; }
|
|
}
|