/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package cn.ysk.cashier.pojo.shop;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author lyf
* @date 2023-11-07
**/
@Entity
@Data
@Table(name="tb_shop_info")
public class TbShopInfo implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "自增id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "`account`")
    @ApiModelProperty(value = "店铺帐号")
    private String account;

    @Column(name = "`shop_code`")
    @ApiModelProperty(value = "店铺代号，策略方式为city +店铺号（8位）")
    private String shopCode;

    @Column(name = "`sub_title`")
    @ApiModelProperty(value = "店铺口号")
    private String subTitle;

    @Column(name = "`merchant_id`")
    @ApiModelProperty(value = "商户Id")
    private String merchantId;

    @Column(name = "`shop_name`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "店铺名称")
    private String shopName;

    @Column(name = "`chain_name`")
    @ApiModelProperty(value = "连锁店扩展店名")
    private String chainName;

    @Column(name = "`back_img`")
    @ApiModelProperty(value = "背景图")
    private String backImg;

    @Column(name = "`front_img`")
    @ApiModelProperty(value = "门头照")
    private String frontImg;

    @Column(name = "`contact_name`")
    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @Column(name = "`phone`")
    @ApiModelProperty(value = "联系电话")
    private String phone;

    @Column(name = "`logo`")
    @ApiModelProperty(value = "店铺log")
    private String logo;

    @Column(name = "`is_deposit`")
    @ApiModelProperty(value = "是否参与代收 0--不参与  1参与 ")
    private Integer isDeposit;

    @Column(name = "`is_supply`")
    @ApiModelProperty(value = "是否为供应商")
    private Integer isSupply;

    @Column(name = "`cover_img`")
    @ApiModelProperty(value = "封面图")
    private String coverImg;

    @Column(name = "`share_img`")
    @ApiModelProperty(value = "店铺分享图")
    private String shareImg;

    @Column(name = "`view`")
    @ApiModelProperty(value = "轮播图")
    private String view;

    @Column(name = "`detail`")
    @ApiModelProperty(value = "店铺简介")
    private String detail;

    @Column(name = "`lat`")
    @ApiModelProperty(value = "经纬度")
    private String lat;

    @Column(name = "`lng`")
    @ApiModelProperty(value = "经纬度")
    private String lng;

    @Column(name = "`mch_id`")
    @ApiModelProperty(value = "未用")
    private String mchId;

    @Column(name = "`register_type`")
    @ApiModelProperty(value = "registerType")
    private String registerType;

    @Column(name = "`is_wx_ma_independent`")
    @ApiModelProperty(value = "是否独立的微信小程序")
    private Integer isWxMaIndependent;

    @Column(name = "`address`")
    @ApiModelProperty(value = "详细地址")
    private String address;

    @Column(name = "`city`")
    @ApiModelProperty(value = "类似于这种规则51.51.570")
    private String city;

    @Column(name = "`type`")
    @ApiModelProperty(value = "店铺类型 超市--MARKET---其它店SHOP")
    private String type;

    @Column(name = "`industry`")
    @ApiModelProperty(value = "行业")
    private String industry;

    @Column(name = "`industry_name`")
    @ApiModelProperty(value = "行业名称")
    private String industryName;

    @Column(name = "`business_start_day`")
    @ApiModelProperty(value = "营业时间")
    private String businessStartDay;

    @Column(name = "`business_end_day`")
    @ApiModelProperty(value = "营业时间")
    private String businessEndDay;

    @Column(name = "`business_time`")
    @ApiModelProperty(value = "营业时间")
    private String businessTime;

    @Column(name = "`post_time`")
    @ApiModelProperty(value = "配送时间")
    private String postTime;

    @Column(name = "`post_amount_line`")
    @ApiModelProperty(value = "postAmountLine")
    private BigDecimal postAmountLine;

    @Column(name = "`on_sale`")
    @ApiModelProperty(value = "0停业1，正常营业,网上售卖")
    private Integer onSale;

    @Column(name = "`settle_type`")
    @ApiModelProperty(value = "0今日，1次日")
    private Integer settleType;

    @Column(name = "`settle_time`")
    @ApiModelProperty(value = "时间")
    private String settleTime;

    @Column(name = "`enter_at`")
    @ApiModelProperty(value = "入驻时间")
    private Integer enterAt;

    @Column(name = "`expire_at`")
    @ApiModelProperty(value = "到期时间")
    private Long expireAt;

    @Column(name = "`status`",nullable = false)
    @NotNull
    @ApiModelProperty(value = "门店状态")
    private Integer status;

    @Column(name = "`average`")
    @ApiModelProperty(value = "人均消费")
    private Float average;

    @Column(name = "`order_wait_pay_minute`")
    @ApiModelProperty(value = "订单等待时间")
    private Integer orderWaitPayMinute;

    @Column(name = "`support_device_number`")
    @ApiModelProperty(value = "支持登陆设备个数")
    private Integer supportDeviceNumber;

    @Column(name = "`distribute_level`")
    @ApiModelProperty(value = "分销层级（1-下级分销 2-两下级分销）")
    private Integer distributeLevel;

    @Column(name = "`created_at`")
    @ApiModelProperty(value = "createdAt")
    private Long createdAt;

    @Column(name = "`updated_at`")
    @ApiModelProperty(value = "updatedAt")
    private Long updatedAt;

    @Column(name = "`proxy_id`")
    @ApiModelProperty(value = "proxyId")
    private String proxyId;
    @Column(name = "profiles")
    @ApiModelProperty(value = "未激活 no 试用probation 正式release")
    private String profiles="";
    @Column(name = "is_open_yhq")
    @ApiModelProperty(value = "是否参与优惠券活动 true false")
    private String isOpenYhq;
    @Column(name = "is_use_vip")
    @ApiModelProperty(value = "是否支持会员支付 0否1是")
    private Integer isUseVip;
    @Column(name = "shop_qrcode")
    @ApiModelProperty(value = "商家二维码")
    private String shopQrcode;
    @Column(name = "provinces")
    @ApiModelProperty(value = "省")
    private String provinces;
    @Column(name = "cities")
    @ApiModelProperty(value = "市")
    private String cities;
    @Column(name = "districts")
    @ApiModelProperty(value = "区")
    private String districts;

    @Column(name = "is_custom")
    @ApiModelProperty(value = "是否允许用户自定义金额")
    private String isCustom;


    @Column(name = "is_return")
    @ApiModelProperty(value = "是否允许用户自定义金额")
    private String isReturn;


    @Column(name = "is_member_in")
    @ApiModelProperty(value = "是否允许用户自定义金额")
    private String isMemberIn;


    @Column(name = "is_member_return")
    @ApiModelProperty(value = "是否允许用户自定义金额")
    private String isMemberReturn;




    public void copy(TbShopInfo source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(false));
    }
}
