package com.yida.data.common.core.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.entity.user.EduUserDept;
import com.yida.data.common.core.entity.user.enums.SectionTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 家校部门树实体类
 *
 * @author ZYJ
 * @date 2021-11-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserDeptTree extends Tree<EduUserDept> {

    private Integer orderNum;

    private Long wxId;

    private Integer type;

    private Long parentWxId;

    private String icon;

    private Long schoolId;

    /**
     * 学段类型. 当家校部门类型为3时存在
     * {@link SectionTypeEnum}
     */
    private String sectionType;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;
}
