package com.xinyilu.system.domain.motionprescriptioninfo;

import com.xinyilu.common.custominterface.Insert;
import com.xinyilu.common.custominterface.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xinyilu.common.annotation.Excel;
import com.xinyilu.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 运动处方字典对象 motion_prescription_dict
 *
 * @author xinyilu
 * @date 2022-08-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "运动处方字典对象", description = "motion_prescription_dict")
public class MotionPrescriptionDict extends BaseEntity implements Serializable {

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = {Update.class})
    private Long id;

    /**
     * 处方名称
     */
    @ApiModelProperty(value = "处方名称")
    @Excel(name = "处方名称")
    @NotBlank(message = "处方名称不能为空", groups = {Insert.class, Update.class})
    private String motionName;

    /**
     * 处方内容
     */
    @ApiModelProperty(value = "处方内容")
    @Excel(name = "处方内容")
    @NotBlank(message = "处方内容不能为空", groups = {Insert.class, Update.class})
    private String motionContent;

    /**
     * 适用人群等级，0：普通，1：会员
     */
    @ApiModelProperty(value = "适用人群等级，0：普通，1：会员")
    @Excel(name = "适用人群等级，0：普通，1：会员")
    private Integer applyCrowd;

    /**
     * 是否删除，0：否，1：是
     */
    private Integer delFlag;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("motionName", getMotionName())
                .append("motionContent", getMotionContent())
                .append("applyCrowd", getApplyCrowd())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
