package cn.estsh.i3plus.pojo.ptl.bean;


import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Wynne.Lu
 * @date 2020/2/12 17:41
 * @desc
 */

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_AREA")
@EqualsAndHashCode(callSuper = true)
@Api("区域")
public class PtlArea extends BaseBean implements Serializable {

    private static final long serialVersionUID = 2112712129904360675L;

    @Column(name = "AREA_NO")
    @ApiParam("区域代码")
    private String areaNo;

    @Column(name = "AREA_NAME")
    @ApiParam("区域名称")
    private String areaName;

    @Transient
    @ApiParam("区段集合")
    private List<PtlSection> ptlSectionList=new ArrayList<>();

    @Transient
    @ApiParam("区域名称")
    private String name;


    public String getName() {
        return areaName;
    }
}
