package com.yhy.module.core.dal.dataobject.workbench;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.yhy.module.core.dal.typehandler.PostgreSQLJsonbTypeHandler;
import java.math.BigDecimal;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 同步库市场主材设备 DO
 *
 * @author yhy
 */
@TableName(value = "yhy_wb_sync_library_market_material", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SyncLibraryMarketMaterialDO extends BaseDO {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private Long tenantId;
    /** 关联同步库分部分项ID（定额节点） */
    private Long syncDivisionId;
    private Long parentId;
    private Long sourceResourceItemId;
    private Long sourceMarketMaterialId;
    private String resourceType;
    private String code;
    private String name;
    private String spec;
    private String unit;
    private BigDecimal consumeQty;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal adjustConsumeQty;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal taxRate;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal taxExclBasePrice;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal taxInclBasePrice;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal taxExclCompilePrice;
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private BigDecimal taxInclCompilePrice;
    private BigDecimal adjustRate;
    private Long categoryId;
    private Long parentResourceId;
    private String sourceType;
    private BigDecimal baseConsumeQty;
    private BigDecimal baseBasePrice;
    @TableField(typeHandler = PostgreSQLJsonbTypeHandler.class)
    private Map<String, Object> snapshotJson;
    private BigDecimal usageQty;
    private Integer sortOrder;
    @TableField(typeHandler = PostgreSQLJsonbTypeHandler.class)
    private Map<String, Object> attributes;
}
