package ee.tuleva.onboarding.capital;

import ee.tuleva.onboarding.user.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
@Builder
@Entity
@Table(name = "users")
@AllArgsConstructor
@NoArgsConstructor
public class InitialCapital {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotNull
    BigDecimal amount;

    @NotBlank
    @Size(min = 3, max = 3)
    String currency;

    @OneToOne
    User user;

}

@@ -422,13 +422,23 @@
  = %22
-users
+initial_capital
 %22)%0A@

Fix initial capital domain table name