/
shmachilin
/
MathCore
Обзор
Документация
Войти
/
shmachilin
/
MathCore
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Tests/ConsoleTest/Entityes/Product.cs
45 строк
1 KB
Infarh
Рефакторинг стиля написания пространств имён во всех файлах
20 окт 2022, 06:08
20 окт 2022, 06:08
a94d602
Код
Авторство
О чём код?
using System.ComponentModel.DataAnnotations.Schema; namespace ConsoleTest.Entityes; class Product { public int Id { get; set; } public string Name { get; set; } [Column(TypeName = "decimal(18,2)")] public decimal Price { get; set; } public ICollection<Cart> Carts { get; set; } = new List<Cart>(); public ICollection<Order> Orders { get; set; } = new List<Order>(); } class Cart { public int Id { get; set; } public User User { get; set; } public ICollection<Product> Products { get; set; } = new List<Product>(); } class User { public int Id { get; set; } public string Name { get; set; } public ICollection<Role> Roles { get; set; } = new List<Role>(); public Cart Cart { get; set; } public ICollection<Order> Orders { get; set; } = new List<Order>(); } class Role { public int Id { get; set; } public string Name { get; set; } public ICollection<User> Users { get; set; } = new List<User>(); } class Order { public int Id { get; set; } public string Address { get; set; } public DateTime Time { get; set; } public ICollection<Product> Products { get; set; } = new List<Product>(); public User User { get; set; } }