package com.ltgk.catches.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 渔获上岸明细记录 tp_fish_catch_record
 *
 * @author Qi ChengBin
 * @date 2025-01-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tp_fish_catch_record")
@ApiModel(value = "渔获上岸明细记录对象", description = "渔获上岸明细记录")
public class TpFishCatchRecord extends Model<TpFishCatchRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "渔获记录主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "渔获上岸id")
    @TableField(value = "catch_id")
    private String catchId;

    @ApiModelProperty(value = "渔港主键")
    @TableField(value = "port_id")
    private String portId;

    @ApiModelProperty(value = "渔港名称")
    @TableField(value = "port_name", condition = SqlCondition.LIKE)
    private String portName;

    @ApiModelProperty(value = "产品名称")
    @TableField(value = "fish_name", condition = SqlCondition.LIKE)
    private String fishName;

    @ApiModelProperty(value = "产品规格")
    @TableField(value = "fish_type", condition = SqlCondition.LIKE)
    private String fishType;

    @ApiModelProperty(value = "渔获重量")
    @TableField(value = "weight")
    private BigDecimal weight;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "称重时间")
    @TableField(value = "weigh_time")
    private Date weighTime;

    @ApiModelProperty(value = "渔获照片地址")
    @TableField(value = "photo")
    private String photo;

    @TableLogic(delval = "1", value = "0")
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
    private Integer delFlag;

    @ApiModelProperty(value = "行政区域编码")
    @TableField(value = "area_code")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @TableField(value = "area_name")
    private String areaName;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_by")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_at")
    private Date createAt;

    @ApiModelProperty(value = "更新人")
    @TableField(value = "update_by")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_at")
    private Date updateAt;

    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty(value = "产品名称对应code")
    @TableField(exist = false)
    private String fishNameCode;

    @ApiModelProperty(value = "产品规格对应code")
    @TableField(exist = false)
    private String fishTypeCode;
}
