package com.app.entity.platform.system;

import com.app.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * 功能描述：地址实体
 *
 * @Auther 梁展鹏
 * @Date 2020/1/18 16:03
 */
@ApiModel("地址实体")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_platform_address")
public class Address extends BaseEntity {

    @ApiModelProperty("名称")
    @NotEmpty
    @TableField("name")
    private String name;

    @ApiModelProperty("地区编码")
    @NotEmpty
    @TableField("area_code")
    private String areaCode;

    @ApiModelProperty("父级编码")
    @NotEmpty
    @TableField("parent_id")
    private String parentId;

    /**
     * @see com.app.constant.SystemConstant.AddressType
     */
    @ApiModelProperty("类型")
    @NotEmpty
    @TableField("type")
    private String type;

}
