package com.huatek.busi.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.huatek.torch.sql.annotation.*;
import com.huatek.torch.sql.beans.Pojo;
import io.swagger.annotations.*;
import lombok.*;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("x_algorithm_basic_data")
@Accessors(chain = true)
@ApiModel(value = "x_algorithm_basic_data", description = "算法实体类信息")
public class AlgorithmBasicData extends Pojo implements Serializable {

    private static final long serialVersionUID = 2795515894400275201L;

    @Id(value = "id")
    @ApiModelProperty(value = "主键编号", name = "id",required = true)
    private String id;

    @FieldName("algorithm")
    @ApiModelProperty(value = "算法名称", name = "algorithm",required = true)
    private String algorithm;

    @FieldName("parent_id")
    @ApiModelProperty(value = "父级编号", name = "parent_id",required = true)
    private String parentId;

    @FieldName("parent_ids")
    @ApiModelProperty(value = "所有父级编号", name = "parent_ids",required = true)
    private String parentIds;

    @FieldName("create_user")
    @ApiModelProperty(value = "创建者", name = "create_user")
    private String createUser;

    @FieldName("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", name = "create_time")
    private LocalDateTime createTime;

    @FieldName("update_user")
    @ApiModelProperty(value = "更新者", name = "update_user")
    private String updateUser;

    @FieldName("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间", name = "update_time")
    private LocalDateTime updateTime;

    @FieldName("deleted")
    @ApiModelProperty(value = "是否删除 0否 1是", name = "deleted")
    private String deleted;

    @NotNull
    @JsonBackReference
    @ApiModelProperty("父级算法")
    private AlgorithmBasicData parent;
}
