Ignore:
Timestamp:
11/14/20 12:27:30 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
68454c6
Parents:
ad60966
Message:

Fix bugs, add some more

Location:
FarmatikoData/Models
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoData/Models/Medicine.cs

    rad60966 r1db5673  
    11using FarmatikoData.Base;
     2using System.Collections;
     3using System.Collections.Generic;
    24using System.ComponentModel.DataAnnotations;
     5using System.Diagnostics.CodeAnalysis;
     6using System.Text.Json.Serialization;
    37
    48namespace FarmatikoData.Models
     
    1822        public float Price { get; set; }
    1923        public string Packaging { get; set; }
     24        //[JsonPropertyName("PHMedicineList")]
     25        public ICollection<PharmacyHeadMedicine> MedicineList { get; set; }
    2026        public Medicine(string Name, string Strength, string Form, string WayOfIssuing, string Manufacturer, float Price, string Packaging)
    2127        {
     
    2834            this.Packaging = Packaging;
    2935        }
    30 
    3136    }
    3237}
  • FarmatikoData/Models/Pharmacy.cs

    rad60966 r1db5673  
    2626            this.WorkAllTime = WorkAllTime;
    2727        }
     28        public int PheadId { get; set; }
     29        public PharmacyHead PHead { get; set; }
    2830    }
    2931}
  • FarmatikoData/Models/PharmacyHead.cs

    rad60966 r1db5673  
    11using System.Collections.Generic;
    22using System.ComponentModel.DataAnnotations;
     3using System.Text.Json.Serialization;
    34using FarmatikoData.Base;
     5using Newtonsoft.Json;
    46
    57namespace FarmatikoData.Models
     
    1113        }
    1214        [Required]
     15        [JsonProperty("Email")]
    1316        public string Email { get; set; }
    1417        [Required]
     18        [JsonProperty("Name")]
    1519        public string Name { get; set; }
    1620        [Required]
     21        [JsonProperty("Passwd")]
    1722        public string Password { get; set; }
    18         public List<MedicineList> MedicineLists { get; set; }
    19         public List<Pharmacy> PharmaciesList { get; set; }
     23        [JsonProperty("PharmacyMedicines")]
     24        public List<Medicine> MedicineList { get; set; }
     25        [Required]
     26        [JsonProperty("Pharmacy")]
     27        public ICollection<Pharmacy> PharmaciesList { get; set; }
     28        //[JsonProperty("PHMedicineList")]
     29        public ICollection<PharmacyHeadMedicine> PHMedicineList { get; set; }
    2030
    2131    }
  • FarmatikoData/Models/RequestPharmacyHead.cs

    rad60966 r1db5673  
    44using System.ComponentModel.DataAnnotations;
    55using System.Text;
     6using System.Text.Json.Serialization;
    67
    78namespace FarmatikoData.Models
     
    1314        }
    1415        [Required]
     16        [JsonPropertyName("PharmacyHead")]
    1517        public PharmacyHead Head { get; set; }
    1618        [Required]
     19        [JsonPropertyName("Pharmacy")]
    1720        public Pharmacy Pharmacy { get; set; }
    1821
Note: See TracChangeset for help on using the changeset viewer.