package com.sz.admin.monitor.pojo.po;

import com.mybatisflex.annotation.*;
import com.sz.mysql.EntityChangeListener;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.io.Serial;
import java.time.LocalDateTime;

/**
 * <p>
 * 区县表
 * </p>
 *
 * @author sz
 * @since 2026-02-03
 */
@Data
@Table(value = "ry_region", onInsert = EntityChangeListener.class, onUpdate = EntityChangeListener.class)
@Schema(description = "区县表")
public class Region implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "区域名称")
    private String name;

    @Schema(description = "父级ID (0表示根节点)")
    private Long parentId;

    @Schema(description = "1-市级 2-区县级")
    private Integer level;

    @Schema(description = "0-区县 1-超高压")
    private Integer type;

    @Schema(description = "行政编码/业务编码")
    private String code;

    @Schema(description = "排序字段")
    private Integer sort;

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

}