package com.jeesharp.business.modules.food.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalTime;

/**
 * 订餐规则
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("biz_food_meal_rule")
public class FoodMealRule extends BaseEntity<FoodMealRule> {

    /**
     * 服务区域ID，null表示全局规则
     */
    private String serviceAreaId;
    /**
     * 服务区域名称快照
     */
    private String serviceAreaName;
    /**
     * 门店ID（兼容字段）
     */
    private String restaurantId;
    /**
     * 餐别，null表示全部餐别
     */
    private String mealType;
    /**
     * 适用范围：all/personal/company
     */
    private String scopeType;
    /**
     * 需提前小时数
     */
    private Integer advanceHours;
    /**
     * 需提前天数
     */
    private Integer advanceDays;
    /**
     * 固定截止时间
     */
    private LocalTime fixedDeadlineTime;
    /**
     * 可预订未来天数
     */
    private Integer bookableFutureDays;
    /**
     * 取消规则：none/before_deadline/anytime
     */
    private String cancelRuleType;
    /**
     * 取消需提前小时数
     */
    private Integer cancelDeadlineHours;
    /** 0-禁用 1-启用 */
    private Integer status;
}
