/*
*  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.cons.domain;

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.io.Serializable;

/**
* @author admin
* @date 2024-06-25
**/
@Entity
@Data
@Table(name="view_product_sku_shop")
public class ViewProductSkuShop implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "自增id")
    private Integer id;

    @Column(name = "`spec_snap`")
    @ApiModelProperty(value = "规格")
    private String specSnap;

    @Column(name = "`name`")
    @ApiModelProperty(value = "商品名称")
    private String name;

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

    @Column(name = "`shop_id`")
    private Integer shopId;


    @Column(name = "`product_id`")
    @ApiModelProperty(value = "商品id")
    private Integer productId;

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