package com.izouma.jmrh.domain;

import com.izouma.jmrh.converter.ContactConverter;
import com.izouma.jmrh.enums.DockingRole;
import com.izouma.jmrh.enums.DockingStatus;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("对接记录")
public class DockingRecord extends BaseEntity {

    private Long userId;

    private Long orgId;

    private Long sndId;

    private Long conversationId;

    @Column(columnDefinition = "TEXT")
    @Convert(converter = ContactConverter.class)
    private Contact contact;

    @Enumerated(EnumType.STRING)
    private DockingStatus status;

    @Enumerated(EnumType.STRING)
    private DockingRole role;
}
