package com.gxwebsoft.common.system.entity;

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

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商户
 *
 * @author 科技小王子
 * @since 2024-04-05 00:03:54
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "Merchant对象", description = "商户")
@TableName("sys_merchant")
public class Merchant implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "merchant_id", type = IdType.AUTO)
    private Long merchantId;

    @Schema(description = "商户名称")
    private String merchantName;

    @Schema(description = "商户标识")
    private String merchantCode;

    @Schema(description = "商户图标")
    private String image;

    @Schema(description = "商户手机号")
    private String phone;

    @Schema(description = "商户姓名")
    private String realName;

    @Schema(description = "店铺类型")
    private String shopType;

    @Schema(description = "商户分类")
    private String category;

    @Schema(description = "经纬度")
    private String lngAndLat;

    @Schema(description = "所在省份")
    private String province;

    @Schema(description = "所在城市")
    private String city;

    @Schema(description = "所在辖区")
    private String region;

    @Schema(description = "详细地址")
    private String address;

    @Schema(description = "手续费")
    private BigDecimal commission;

    @Schema(description = "关键字")
    private String keywords;

    @Schema(description = "资质图片")
    private String files;

    @Schema(description = "营业时间")
    private String businessTime;

    @Schema(description = "商户简介")
    private String content;

    @Schema(description = "是否自营")
    private Integer ownStore;

    @Schema(description = "每小时价格")
    private BigDecimal price;

    @Schema(description = "是否推荐")
    private Integer recommend;

    @Schema(description = "是否需要审核")
    private Boolean goodsReview;

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

    @Schema(description = "管理入口")
    private String adminUrl;

    @Schema(description = "所有人")
    private Integer userId;

    @Schema(description = "状态")
    private Integer status;

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

    @Schema(description = "排序号")
    private Integer sortNumber;

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

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

    @Schema(description = "默认商户管理员角色ID")
    @TableField(exist = false)
    private Integer roleId;

    @Schema(description = "角色名称")
    @TableField(exist = false)
    private String roleName;

}
