package com.erp.dashboard.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 仓库实体 - 用于Dashboard云仓统计
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("warehouses")
public class Warehouse {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long tenantId;
    private String name;
    private String code;
    private String type;
    private String address;
    private String contact;
    private String phone;
    private Integer status;
    private String remark;

    @TableLogic
    private LocalDateTime deletedAt;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    // 仓库类型常量
    public static final String TYPE_CLOUD = "cloud";
    public static final String TYPE_SELF = "self";

    // 仓库状态常量
    public static final Integer STATUS_ACTIVE = 1;
    public static final Integer STATUS_INACTIVE = 0;
}
