/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.stocks.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tofly.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;


/**
 * 库存仓库表
 *
 * @author admin
 * @date Fri Nov 25 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_STOCKS_STORE", resultMap = "storeMap")
@KeySequence("TF_STOCKS_STORE")
@ApiModel
public class Store extends Model<Store> {
    private static final long serialVersionUID = 1L;

    /**
     * 仓库表主键ID
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "仓库表主键ID")
    private Long id;
    /**
     * 仓库名称
     */
    @ApiModelProperty(value = "仓库名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    @NotNull(message = "仓库名称不能为空")
    private String storeName;
    /**
     * 水厂ID
     */
    @ApiModelProperty(value = "水厂ID")
    @NotNull(message = "水厂ID不能为空")
    private Long waterworksId;
    /**
     * 水厂名称
     */
    @ApiModelProperty(value = "水厂名称",hidden = true)
    @TableField(exist = false)
    private String waterworksName;
    /**
     * 仓库管理员ID
     */
    @ApiModelProperty(value = "仓库管理员ID")
    private Long storeManagerUserId;
    /**
     * 仓库管理员名称
     */
    @ApiModelProperty(value = "仓库管理员名称",hidden = true)
    @TableField(exist = false)
    private String storeManagerUserName;
    /**
     * 仓库作用Id
     */
    @ApiModelProperty(value = "仓库作用Id")
    private Long storeFunction;

    /**
     * 仓库作用
     */
    @ApiModelProperty(value = "仓库作用")
    @TableField(exist = false)
    private String storeFunctionName;
    /**

    /**
     * 是否启用,0否，1是
     */
    @ApiModelProperty(value = "是否启用,0否，1是")
    private String storeEnable;


    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 更新人员
     */
    @ApiModelProperty(value = "更新人员")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String updateUserName;

}
