dev add tarriff description
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-15 14:44:54 +07:00
parent 7c7ad61397
commit a4928395b9
5 changed files with 13 additions and 3 deletions
@@ -21,7 +21,7 @@ public class TariffService {
private final TariffRepository tariffRepository;
public void addTariff(String tariffName, double price, String type, int tokens, long diskSize, long maxUsers,
int maxFilesCount, String tariffTerm) {
int maxFilesCount, String tariffTerm, String description) {
Tariff tariff = new Tariff();
tariff.setName(tariffName);
tariff.setPrice(price);
@@ -31,6 +31,7 @@ public class TariffService {
tariff.setMaxUsers(maxUsers);
tariff.setMaxFilesCount(maxFilesCount);
tariff.setTariffTerm(TariffTimeTerm.valueOf(tariffTerm.toUpperCase()));
tariff.setDescription(description);
tariffRepository.save(tariff);
}
@@ -113,7 +114,8 @@ public class TariffService {
tariff.getMaxFilesCount(),
tariff.getDiskSize(),
tariff.getMaxUsers(),
tariffTerm == null ? "" : tariffTerm.name()
tariffTerm == null ? "" : tariffTerm.name(),
tariff.getDescription() == null ? "" : tariff.getDescription()
);
}
@@ -125,6 +127,7 @@ public class TariffService {
tariff.setMaxFilesCount(dto.getMaxFilesCount());
tariff.setDiskSize(dto.getDiskSize());
tariff.setMaxUsers(dto.getMaxUsers());
tariff.setDescription(dto.getDescription());
tariff.setTariffTerm(TariffTimeTerm.valueOf(dto.getTariffTerm().toUpperCase()));
}
}