package com.reading.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 家长-学生关联实体
 */
@Data
@TableName("t_parent_student")
@Schema(description = "家长 - 学生关联")
public class ParentStudent {

    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID", accessMode = Schema.AccessMode.READ_ONLY)
    private String id;

    @Schema(description = "家长 ID")
    private String parentId;

    @Schema(description = "学生 ID")
    private String studentId;

    @Schema(description = "关系")
    private String relationship;

    @Schema(description = "是否主要联系人", example = "1")
    private Integer isPrimary;

    @Schema(description = "创建人用户名", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @Schema(description = "创建时间", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "是否删除", accessMode = Schema.AccessMode.READ_ONLY)
    @TableLogic
    private Integer deleted;

}
