package cn.iocoder.yudao.module.system.dal.dataobject.biz;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseNoDeleteDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

/**
 * 危险物品登记 DO
 */
@TableName("elderly_danger_material_register")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElderlyDangerMaterialRegisterDO extends BaseNoDeleteDO {

    @TableId
    private Long id;

    @Schema(description = "长者id")
    private Long elderId;

    @Schema(description = "长者姓名")
    private String elderName;

    @Schema(description = "楼栋id")
    private Long buildId;

    @Schema(description = "楼层id")
    private Long floorId;

    @Schema(description = "登记人")
    private String assessor;

    @Schema(description = "登记日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate assessDate;

    @Schema(description = "登记数据")
    private String assessData;

    @Schema(description = "机构id")
    private Long tenantId;
}

