package com.lesingle.creation.vo.teacher;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 教师响应 VO
 */
@Data
@Schema(description = "教师响应")
public class TeacherVO {

    @Schema(description = "教师 ID")
    private Long id;

    @Schema(description = "用户 ID")
    private Long userId;

    @Schema(description = "租户 ID")
    private Long tenantId;

    @Schema(description = "部门 ID")
    private Long departmentId;

    @Schema(description = "工号")
    private String employeeNo;

    @Schema(description = "联系电话")
    private String phone;

    @Schema(description = "身份证号")
    private String idCard;

    @Schema(description = "性别：1-男，2-女")
    private Integer gender;

    @Schema(description = "出生日期")
    private LocalDate birthDate;

    @Schema(description = "入职日期")
    private LocalDate hireDate;

    @Schema(description = "任教科目")
    private String subject;

    @Schema(description = "职称")
    private String title;

    @Schema(description = "教师描述")
    private String description;

    @Schema(description = "有效状态")
    private Integer validState;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "用户信息")
    private UserInfo userInfo;

    @Schema(description = "部门信息")
    private DepartmentInfo department;

    /**
     * 用户信息嵌套 VO
     */
    @Data
    @Schema(description = "用户信息")
    public static class UserInfo {
        @Schema(description = "用户名")
        private String username;
        @Schema(description = "昵称")
        private String nickname;
        @Schema(description = "邮箱")
        private String email;
        @Schema(description = "头像 URL")
        private String avatar;
    }

    /**
     * 部门信息嵌套 VO
     */
    @Data
    @Schema(description = "部门信息")
    public static class DepartmentInfo {
        @Schema(description = "部门 ID")
        private Long id;
        @Schema(description = "部门名称")
        private String name;
        @Schema(description = "部门编码")
        private String code;
    }
}
