dev add reset password
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-02-18 16:14:17 +07:00
parent 8811f3ce0e
commit 3d5856d302
7 changed files with 232 additions and 2 deletions
@@ -0,0 +1,61 @@
package ru.soune.nocopy.entity.payment;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import ru.soune.nocopy.entity.tarif.Tariff;
import ru.soune.nocopy.entity.user.User;
import java.time.LocalDateTime;
@Entity
@Table(name = "payment")
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@EntityListeners(AuditingEntityListener.class)
public class Payment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Enumerated(EnumType.STRING)
@Column(name = "status", nullable = false)
private PaymentStatus status;
@Column(name = "payment_uuid", unique = true)
private String paymentUuid;
@Column(name = "amount")
private Double amount;
@CreatedDate
@Column(name = "created_at", updatable = false, nullable = false)
private LocalDateTime createdAt;
@LastModifiedDate
@Column(name = "updated_at")
private LocalDateTime updatedAt;
@Enumerated(EnumType.STRING)
@Column(name = "operation_type", nullable = false)
private PaymentOperationType operationType;
@Column(name = "cancellation_reason")
private String cancellationReason;
@ManyToOne
@JoinColumn(name = "user_id", nullable = false)
private User user;
@ManyToOne
@JoinColumn(name = "tariff_id")
private Tariff tariff;
}
@@ -0,0 +1,6 @@
package ru.soune.nocopy.entity.payment;
public enum PaymentOperationType {
TARIFF,
TOKEN_REFILL
}
@@ -0,0 +1,10 @@
package ru.soune.nocopy.entity.payment;
public enum PaymentStatus {
PENDING,
WAITING,
SUCCEEDED,
CANCELED,
FAILED
}