This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package ru.soune.nocopy.entity.tarif;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Entity
|
||||
@Table(name = "tariff")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
public class Tariff {
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
|
||||
@Column(name = "tariff_name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "price")
|
||||
private double price;
|
||||
|
||||
@Column(name = "tokens")
|
||||
private int tokens;
|
||||
|
||||
@Column(name = "max_files_count")
|
||||
private int maxFilesCount;
|
||||
|
||||
@Column(name = "disk_size")
|
||||
private Long diskSize;
|
||||
|
||||
@Column(name = "max_users")
|
||||
private Long maxUsers;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package ru.soune.nocopy.entity.tarif;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Table(name = "tariff_info")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Getter @Setter
|
||||
public class TariffInfo {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.UUID)
|
||||
private String id;
|
||||
|
||||
@Column(name = "status", nullable = false)
|
||||
private TariffStatus status;
|
||||
|
||||
@Column(name = "start_tariff")
|
||||
private LocalDateTime startTariff;
|
||||
|
||||
@Column(name = "end_tariff")
|
||||
private LocalDateTime endTariff;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "tariff_id")
|
||||
private Tariff tariff;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package ru.soune.nocopy.entity.tarif;
|
||||
|
||||
public enum TariffStatus {
|
||||
ACTIVE, EXPIRED, INACTIVE
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package ru.soune.nocopy.entity.tarif;
|
||||
|
||||
|
||||
public enum TariffType {
|
||||
START, BASIC, PRO, ENTERPRISE, DEMO;
|
||||
}
|
||||
Reference in New Issue
Block a user