package com.loan.system.domain.entity;

import lombok.*;

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


@Entity
@Table(name = "contract_case_collateral", uniqueConstraints = {
        @UniqueConstraint(name = "uk_contract_collateral_case", columnNames = {"contract_id", "collateral_id", "case_id"})
})
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContractAndCollateral extends BaseEntity{
    private static final long serialVersionUID = 27L;

    @NotNull
    @Column(name = "contract_id", nullable = false)
    private Long contractId;

    @NotNull
    @Column(name = "collateral_id", nullable = false)
    private Long collateralId;

    @Column(name = "case_id")
    private Long caseId;

    @Column(name = "create_time")
    private String createTime;

    @Column(name = "update_time")
    private String updateTime;

    @Column(name = "is_delete")
    private Boolean isDelete;

}