package com.haha.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 门店固定资产实体类
 */
@Data
@TableName("t_shop_fixed_asset")
public class ShopFixedAsset implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 门店档案ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long shopArchiveId;

    /**
     * 门店ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long shopId;

    /**
     * 资产类型
     */
    private String assetType;

    /**
     * 资产名称
     */
    private String assetName;

    /**
     * 资产编码
     */
    private String assetCode;

    /**
     * 资产状态
     */
    private String assetStatus;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long creatorId;

    /**
     * 创建人姓名
     */
    private String creatorName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    /**
     * 编辑人ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long editorId;

    /**
     * 编辑人姓名
     */
    private String editorName;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime updateTime;

    // ========== 以下为非数据库字段，用于前端展示 ==========

    /**
     * 资产类型标签
     */
    @TableField(exist = false)
    private String assetTypeLabel;

    /**
     * 资产状态标签
     */
    @TableField(exist = false)
    private String assetStatusLabel;
}
