package com.gpf.pethospital.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 处方实体
 */
@Data
@Accessors(chain = true)
@TableName("prescription")
public class Prescription {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 就诊记录ID
     */
    private Long visitId;

    /**
     * 医生ID
     */
    private Long doctorId;

    /**
     * 处方状态：DRAFT-草稿, SUBMITTED-已提交, ISSUED-已发药, VOIDED-已作废
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 删除标记：0-未删除, 1-已删除
     */
    @TableLogic
    private Integer deleted;
}
