package com.zksy.base.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 设备基础信息表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("equipment_base")
public class EquipmentBase {

    @TableId(value = "equipment_id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty("设备唯一ID（主键）")
    private String equipmentId;

    @ApiModelProperty("设备编码（唯一标识）")
    private String equipmentCode;

    @ApiModelProperty("设备名称")
    private String equipmentName;

    @ApiModelProperty("设备型号")
    private String equipmentModel;

    @ApiModelProperty("设备规格参数")
    private String equipmentSpec;

    @ApiModelProperty("设备制造商")
    private String manufacturer;

    @ApiModelProperty("所属片区（城南/城北/太常）")
    private String district;

    @ApiModelProperty("设备生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date productionDate;

    @ApiModelProperty("设备类别ID（关联equipment_type表）")
    private String equipmentTypeId;

    @ApiModelProperty("设备资产价值（元）")
    private Double assetValue;

    @ApiModelProperty("预计使用年限（年）")
    private Integer useLife;

    @ApiModelProperty("设备经度")
    private BigDecimal longitude;

    @ApiModelProperty("设备纬度")
    private BigDecimal latitude;

    @ApiModelProperty("设备位置描述")
    private String equipmentLocation;

    @ApiModelProperty("安装时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime installTime;

    @ApiModelProperty("设备负责人")
    private String maintainer;

    @ApiModelProperty("联系方式")
    private String maintainerPhone;

    @ApiModelProperty("权属单位")
    private String ownershipUnit;

    @ApiModelProperty("备注信息")
    private String remark;

    @ApiModelProperty("设备图片URL")
    private String equipmentImage;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
