package com.loan.system.domain.entity;

import lombok.*;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Entity
@Table(name = "contract_seq", uniqueConstraints = {
        @UniqueConstraint(name = "uk_seq_data", columnNames = {"seq_data"})
})
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContractSeq extends BaseEntity{
    private static final long serialVersionUID = 28L;

    @Column(name = "business_attr", nullable = false, length = 20)
    private  String businessAttr;

    @Size(max = 8)
    @NotNull
    @Column(name = "seq_data", nullable = false, length = 8)
    private String seqData;

    @NotNull
    @Column(name = "next_seq", nullable = false)
    private Long nextSeq;

}