package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户角色关联表
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("store_platform_user_role")
@ApiModel(value = "StorePlatformUserRole对象", description = "用户角色关联表")
public class StorePlatformUserRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户ID（关联store_user.id）")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "角色ID（关联store_platform_role.role_id）")
    @TableField("role_id")
    private Long roleId;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "店铺ID")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "删除标志（0未删除 1已删除）")
    @TableField("delete_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;


    @ApiModelProperty(value = "删除标志（0未删除 1已删除）")
    @TableField("account_name")
    private String accountName;

    @ApiModelProperty(value = "禁用标志（0启用 1 禁用）")
    @TableField("status")
    private Integer status;

}
