Browse Source

complete auctionEntity

DarkGolly 4 years ago
parent
commit
f7d50a02b6

+ 1 - 0
CardCollector/Auction/AuctionController.cs

@@ -35,6 +35,7 @@ namespace CardCollector.Auction
 
         public static async Task<int> GetStickerCount(string stickerId)
         {
+            
             //TODO вернуть количество стикера на аукционе по его id
             return 0;
         }

+ 7 - 4
CardCollector/DataBase/Entity/AuctionEntity.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
+using Microsoft.EntityFrameworkCore.Metadata.Conventions;
 
 namespace CardCollector.DataBase.Entity
 {
@@ -7,17 +8,19 @@ namespace CardCollector.DataBase.Entity
     public class AuctionEntity
     {
         /* id стикера */
-        [Key]
-        [Column("id"), MaxLength(32)] public int Id { get; set; }
+        [Column("id"), MaxLength(127)] public long Id { get; set; }
         
-        /* цена */
+        /* цена  */
         [Column("price"), MaxLength(32)] public int Price { get; set; }
         
         /* валюта */
-        [Column("currency"), MaxLength(32)] public int Сurrency { get; set; }
+        [Column("valuta"), MaxLength(16)] public string Valuta { get; set; }
         
         /* количество */
         [Column("quantity"), MaxLength(32)] public int Quantity { get; set; }
         
+        /* продавец */
+        [Column("trader"), MaxLength(256)] public string Trader { get; set; }
+        
     }
 }