package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.SysMuenRole;
import com.ssm.manage.entity.SysRoleStore;
import com.ssm.manage.page.BasePage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 新登录（门店角色表）(SysStoreRole)实体类
 *
 * @author makejava
 * @since 2022-06-25 10:17:03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class SysStoreRoleRequest extends BasePage {
    /**
     * 角色编码
     */
    @Column(name = "role_num")
    private String roleNum;
    /**
     * 角色名称
     */
    @Column(name = "role_name")
    private String roleName;
    /**
     * 状态 1：正常；0：停用
     */
    @Column(name = "state")
    private Integer state;
    /**
     * 建立人（用户名称（用户编码））
     */
    @Column(name = "founder")
    private String founder;
    /**
     * 建立时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "founder_datetime")
    private Date founderDatetime;
    /**
     * 最近修改人（用户名称（用户编码））
     */
    @Column(name = "modify_by")
    private String modifyBy;
    /**
     * 最近修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "modify_datetime")
    private Date modifyDatetime;
    /**
     * 门店id
     */
    @Column(name = "store_id")
    private Long storeId;
    /**
     * 门店编码
     */
    @Column(name = "store_num")
    private String storeNum;
    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;
    /**
     * 角色id
     */
    @Id
    private Long id;

    private List<SysRoleStoreRequest> sysRoleStoreRequests;
    private List<SysMuenRole> sysMuenRoles;

}

