package com.bocloud.ims.entity.resource.azure.slb;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

@Table("front_end")
public class FrontEnd extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("uuid")
    private String uuid;
    @Column("slb_id")
    private Long slbId;
    @Column("public_ip_id")
    private Long publicIpId;
    @Column("vendor_id")
    private Long vendorId;
    @Column("subnet_id")
    private Long subnetId;
    @Column("front_end_type")
    private String frontEndType;//INTERNAL(内部),EXTERNAL(外部)
    @Column("private_ip_address")
    private String privateIpAddress;
    @IgnoreAll
    private String publicIpAddress;
    @IgnoreAll
    private String publicIpName;
    @IgnoreAll
    private Long vpcId;

    public Long getVpcId() {
        return vpcId;
    }

    public void setVpcId(Long vpcId) {
        this.vpcId = vpcId;
    }

    public String getPrivateIpAddress() {
        return privateIpAddress;
    }

    public void setPrivateIpAddress(String privateIpAddress) {
        this.privateIpAddress = privateIpAddress;
    }

    public String getFrontEndType() {
        return frontEndType;
    }

    public void setFrontEndType(String frontEndType) {
        this.frontEndType = frontEndType;
    }

    public Long getSubnetId() {
        return subnetId;
    }

    public void setSubnetId(Long subnetId) {
        this.subnetId = subnetId;
    }

    public String getPublicIpName() {
        return publicIpName;
    }

    public void setPublicIpName(String publicIpName) {
        this.publicIpName = publicIpName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Long getSlbId() {
        return slbId;
    }

    public void setSlbId(Long slbId) {
        this.slbId = slbId;
    }

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public FrontEnd() {
        super();
    }

    public Long getPublicIpId() {
        return publicIpId;
    }

    public void setPublicIpId(Long publicIpId) {
        this.publicIpId = publicIpId;
    }

    public String getPublicIpAddress() {
        return publicIpAddress;
    }

    public void setPublicIpAddress(String publicIpAddress) {
        this.publicIpAddress = publicIpAddress;
    }

    public void preSave(Long creatorId, Long menderId, Long vendorId) {
        this.setCreatorId(creatorId);
        this.setMenderId(menderId);
        this.setVendorId(vendorId);
    }

}
