Entity Name: DiscountType
Data Schema: Shop
Master Service: DiscountCampaignService
| 3.1 CountryService | 3.2 DiscountCampaignService | 3.3 ProductService | 3.4 ShopLicenseService |
| Property Name | Datatype | Data Entity | Reference Entity |
| Buy | INT | DiscountType | |
| FixedAmount | DOUBLE | DiscountType | |
| FreeShipping | BOOL | DiscountType | |
| Pay | INT | DiscountType | |
| Percentage | DOUBLE | DiscountType | |
| PrimaryKey | LONG | DiscountType | |
| ServerReplicationVersion | LONG | DiscountType | |
| ShopOwner | LONG | DiscountType |
| Relative mapping URL | Request Method | Method Name | Microservice | Involved Entities |
| /discounttype/{id} | PUT | updateDiscountTypeById(discounttype) | DiscountCampaignService | DiscountType |
| /discounttype | POST | insertDiscountType(discounttype) | DiscountCampaignService | DiscountType |
| /discountcampaign/discounttype/{id} | GET | findAllDiscountCampaignOfDiscountType(id) | DiscountCampaignService | DiscountType DiscountCampaign |
| /discounttype/{id} | DELETE | deleteDiscountTypeById(id) | DiscountCampaignService | DiscountType |
| /discounttype | GET | findAllDiscountType() | DiscountCampaignService | DiscountType |
| /discounttype/{id} | GET | findDiscountTypeById(id) | DiscountCampaignService | DiscountType |
Pseudo code snippet
final DiscountType discounttype = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + id, DiscountType.class);