File History: src/main/java/com/paymentlink/model/entity/ExchangeRate.java

← View file content

File Content at Commit f0438c2

1 package com.paymentlink.model.entity;
2
3 import jakarta.persistence.*;
4 import lombok.AllArgsConstructor;
5 import lombok.Builder;
6 import lombok.Data;
7 import lombok.NoArgsConstructor;
8
9 import java.time.LocalDateTime;
10
11 @Entity
12 @Table(name = "exchange_rates",
13 indexes = @Index(name = "idx_currency_pair", columnList = "fromCurrency,toCurrency"))
14 @Data
15 @NoArgsConstructor
16 @AllArgsConstructor
17 @Builder
18 public class ExchangeRate {
19
20 @Id
21 @GeneratedValue(strategy = GenerationType.IDENTITY)
22 private Long id;
23
24 @Column(nullable = false, length = 3)
25 private String fromCurrency; // "USD"
26
27 @Column(nullable = false, length = 3)
28 private String toCurrency; // "EUR", "GBP", etc.
29
30 @Column(nullable = false)
31 private Double rate; // Exchange rate (e.g., 0.92 for USD to EUR)
32
33 @Column(nullable = false)
34 private LocalDateTime fetchedAt;
35
36 @Column(nullable = false)
37 private LocalDateTime expiresAt; // Cache for 1 hour
38
39 // For load balancing - prevents duplicate refresh jobs
40 @Version
41 private Long version;
42 }
43

Commits

Commit Author Date Message File SHA Actions
f0438c2 <f69e50@finnacloud.com> 1766443042 +0300 12/22/2025, 10:37:22 PM increment once more 255d1af Hide
188fc92 <f69e50@finnacloud.com> 1766442998 +0300 12/22/2025, 10:36:38 PM increment 255d1af View
4617f76 <f69e50@finnacloud.com> 1766442953 +0300 12/22/2025, 10:35:53 PM rename branch from main to master oops 255d1af View
e6d1548 <f69e50@finnacloud.com> 1766442769 +0300 12/22/2025, 10:32:49 PM add initial test workflow file 255d1af View
9c24ca4 <f69e50@finnacloud.com> 1766442705 +0300 12/22/2025, 10:31:45 PM add CI configuration and test script for Jenkins build 255d1af View
690c1f6 <f69e50@finnacloud.com> 1766368110 +0300 12/22/2025, 1:48:30 AM initialize backend structure with controllers, DTOs, and configuration files 255d1af View