package com.yida.data.common.core.entity.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 缴费账单项目表 Entity
 *
 * @author ZYJ
 * @date 2021-12-24 09:47:16
 */
@Data
@TableName("edu_bill_item")
public class EduBillItem implements Serializable {

    private static final long serialVersionUID = 1570934490270918542L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 是否删除，1删除0未删除，默认0
     */
    @ApiModelProperty(value = "是否删除，1删除0未删除，默认0")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 最后修改时间
     */
    @ApiModelProperty(value = "最后修改时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 最后修改人id
     */
    @ApiModelProperty(value = "最后修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 缴费单id
     */
    @ApiModelProperty(value = "缴费单id")
    @TableField("bill_id")
    private Long billId;

    /**
     * 缴费项目名称
     */
    @ApiModelProperty(value = "缴费项目名称")
    @TableField("item_name")
    private String itemName;

    /**
     * 缴费项目金额
     */
    @ApiModelProperty(value = "缴费项目金额")
    @TableField("item_price")
    private BigDecimal itemPrice;

    /**
     * 是否必缴. 0: 选缴, 1: 必缴
     */
    @ApiModelProperty(value = "是否必缴. 0: 选缴, 1: 必缴")
    @TableField("must_pay")
    private Integer mustPay;

    /**
     * 是否减免费用. 0: 不减免, 1: 减免
     */
    @ApiModelProperty(value = "是否减免费用. 0: 不减免, 1: 减免")
    @TableField("reduction_status")
    private Integer reductionStatus;

    /**
     * 家庭类型,英文逗号分割,对应字典family_type
     */
    @ApiModelProperty(value = "家庭类型,英文逗号分割,对应字典family_type")
    @TableField("family_type")
    private String familyType;

    /**
     * 减免金额
     */
    @ApiModelProperty(value = "减免金额")
    @TableField("reduction_price")
    private BigDecimal reductionPrice;

    @ApiModelProperty("类型.0: 单选, 1:多项选一项, 2:多项选多项")
    private Integer itemOption;

    @ApiModelProperty("是否是不定费用. 0:否, 1:是")
    private Integer indefiniteStatus;

    @ApiModelProperty("项目选项列表")
    private transient List<EduBillItemSub> subItemList;
}