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.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
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_blood_sugar_record")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElderlyBloodSugarRecordDO extends BaseNoDeleteDO {

    @TableId
    private Long id;

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

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

    @Schema(description = "血糖值")
    private BigDecimal bloodSugar;

    @Schema(description = "备注")
    private String remark;

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

