package com.gxwebsoft.glt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 水票
 *
 * @author 科技小王子
 * @since 2026-02-03 18:55:54
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "GltTicketTemplate对象", description = "水票")
@TableName("glt_ticket_template")
public class GltTicketTemplate implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "关联商品ID")
    private Integer goodsId;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "启用")
    private Boolean enabled;

    @Schema(description = "单位名称")
    private String unitName;

    @Schema(description = "最小购买数量")
    private Integer minBuyQty;

    @Schema(description = "起始发送数量")
    private Integer startSendQty;

    @Schema(description = "买赠：买1送4 => gift_multiplier=4")
    private Integer giftMultiplier;

    @Schema(description = "是否把购买量也计入套票总量（默认仅计入赠送量）")
    private Boolean includeBuyQty;

    @Schema(description = "每期释放数量（默认每月释放10）")
    private Integer monthlyReleaseQty;

    @Schema(description = "总共释放多少期（若配置>0，则按期数平均分摊）")
    private Integer releasePeriods;

    @Schema(description = "首期释放时机：0=支付成功当刻；1=下个月同日")
    private Integer firstReleaseMode;

    @Schema(description = "步长")
    private Integer step;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

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

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
