package vip.xiaonuo.disk.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.*;

@Data
@Table(name = "STORAGE_RE", uniqueConstraints = {
        @UniqueConstraint(name = "userid_index", columnNames = {"userId"})
})
@Entity
@TableName("STORAGE_RE")
public class StorageReBean {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(columnDefinition="bigint(20)")
    @TableId(type = IdType.AUTO)
    private Long storageId;

    @Column(columnDefinition="varchar(20)")
    private String userId;

    @Column(columnDefinition="bigint(20) comment '占用存储大小'")
    private Long storageSize;

    @Column(columnDefinition="bigint(20) comment '总存储大小'")
    private Long totalStorageSize;

    @Column(columnDefinition="varchar(25) comment '修改时间'")
    private String modifyTime;
    @Column(columnDefinition="bigint(20) comment '修改用户id'")
    private Long modifyUserId;

    public StorageReBean() {

    }

    public StorageReBean(String userId) {
        this.userId = userId;
    }
}
