/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.yifu.cloud.plus.v1.yifu.archives.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 瓜子特殊字典
 *
 * @author hgw
 * @date 2026-02-03 14:16:10
 */
@Data
@TableName("t_gz_area")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "瓜子特殊字典")
public class TGzArea extends BaseEntity {

	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty("ID")
	@Schema(description = "ID")
	private String id;
	/**
	 * 省
	 */
	@ExcelAttribute(name = "省")
	@ExcelProperty("省")
	@Schema(description = "省")
	private Integer province;
	/**
	 * 市
	 */
	@ExcelAttribute(name = "市")
	@ExcelProperty("市")
	@Schema(description = "市")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Integer city;
	/**
	 * 区县
	 */
	@ExcelAttribute(name = "区县")
	@ExcelProperty("区县")
	@Schema(description = "区县")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Integer town;
	/**
	 * 皖信地址编码
	 */
	@ExcelAttribute(name = "皖信地址编码", isNotEmpty = true, errorInfo = "皖信地址编码不能为空", maxLength = 11)
	@NotBlank(message = "皖信地址编码不能为空")
	@Length(max = 11, message = "皖信地址编码不能超过11个字符")
	@ExcelProperty("皖信地址编码")
	@Schema(description = "皖信地址编码")
	private String areaCode;
	/**
	 * 皖信地址
	 */
	@ExcelAttribute(name = "皖信地址", maxLength = 50)
	@Length(max = 50, message = "皖信地址不能超过50个字符")
	@ExcelProperty("皖信地址")
	@Schema(description = "皖信地址")
	private String areaName;
	/**
	 * 瓜子地址编码
	 */
	@ExcelAttribute(name = "瓜子地址编码", isNotEmpty = true, errorInfo = "瓜子地址编码不能为空", maxLength = 11)
	@NotBlank(message = "瓜子地址编码不能为空")
	@Length(max = 11, message = "瓜子地址编码不能超过11个字符")
	@ExcelProperty("瓜子地址编码")
	@Schema(description = "瓜子地址编码")
	private String gzCode;
	/**
	 * 瓜子城市名称
	 */
	@ExcelAttribute(name = "瓜子城市名称", maxLength = 50)
	@Length(max = 50, message = "瓜子城市名称不能超过50个字符")
	@ExcelProperty("瓜子城市名称")
	@Schema(description = "瓜子城市名称")
	private String gzName;

}
