package study.u45;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;

/** 实体：租户列 + 乐观锁版本 + 逻辑删除标记。 */
@TableName("u45_item")
public class Item {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    @TableField("tenant_id")
    private Long tenantId;
    @Version
    private Integer version;
    @TableLogic
    private Integer deleted;

    public Item() {
    }

    public Item(String name) {
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getDeleted() {
        return deleted;
    }
}
