Skip to content

Instantly share code, notes, and snippets.

@vinaypuranik
Last active July 23, 2020 14:16
Show Gist options
  • Save vinaypuranik/9884699b64d5546cece70dfbad12549b to your computer and use it in GitHub Desktop.
Save vinaypuranik/9884699b64d5546cece70dfbad12549b to your computer and use it in GitHub Desktop.
package ee.energia.ocppapi.model.entity;
import ee.energia.ocppapi.model.ChargingProfileKind;
import ee.energia.ocppapi.model.ChargingProfilePurpose;
import ee.energia.ocppapi.model.ChargingRateUnitType;
import ee.energia.ocppapi.model.RecurrencyKindType;
import lombok.Data;
import javax.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@Entity
@Table(name = "\"ocpp-message-V_16-SetChargingProfile-req\"")
@IdClass(SetChargingProfileReqPK.class)
public class SetChargingProfileReq {
@Id
@Column(name = "\"__connect_topic\"")
private String connectTopic;
@Id
@Column(name = "\"__connect_partition\"")
private int connectPartition;
@Id
@Column(name = "\"__connect_offset\"")
private long connectOffset;
@Column(name="startSchedule", columnDefinition = "TIMESTAMP")
private LocalDateTime startSchedule;
@Enumerated(value = EnumType.STRING)
@Column(name = "recurrencyKind")
private RecurrencyKindType recurrencyKind;
@Column(name="connectorId")
private int connectorId;
@Enumerated(value = EnumType.STRING)
@Column(name = "chargingRateUnit")
ChargingRateUnitType chargingRateUnitType;
@Column(name = "\"wrapper.messageKey\"")
private String wrapperMessageKey;
@Column(name = "\"wrapper.errorDescription\"")
private String wrapperErrorDescription;
@Column(name = "\"wrapper.chargerId\"")
private String wrapperChargerId;
@Column(name = "\"wrapper.messageId\"")
private String wrapperMessageId;
@Column(name = "\"wrapper.errorCode\"")
private String wrapperErrorCode;
@Column(name = "\"wrapper.centralSystemId\"")
private String wrapperCentralSystemId;
@Column(name = "\"wrapper.ocppTransport\"")
private String wrapperOcppTransport;
@Column(name = "\"wrapper.ownership\"")
private String wrapperOwnership;
@Column(name = "\"wrapper.messageType\"")
private String wrapperMessageType;
@Column(name = "\"wrapper.messageDump\"")
private String wrapperMessageDump;
@Column(name = "\"wrapper.vendor\"")
private String wrapperVendor;
@Column(name = "\"wrapper.ocppVersion\"")
private String wrapperOcppVersion;
@Column(name = "\"wrapper.pduName\"")
private String wrapperPduName;
@Column(name = "\"wrapper.action\"")
private String wrapperAction;
@Column(name = "\"wrapper.errorDetails\"")
private String wrapperErrorDetails;
@Column(name = "\"wrapper.timestamp\"", columnDefinition = "TIMESTAMP")
private LocalDateTime wrapperTimestamp;
@Column(name = "validFrom", columnDefinition = "TIMESTAMP")
private LocalDateTime validFrom;
@Column(name = "stackLevel")
private int stackeLevel;
@Column(name = "transactionId")
private int transactionId;
@Enumerated(value = EnumType.STRING)
@Column(name = "chargingProfileKind")
private ChargingProfileKind chargingProfileKind;
@Column(name ="duration")
private int duration;
@Column(name="minChargingRate")
private BigDecimal minChargingRate;
@Enumerated(value = EnumType.STRING)
@Column(name="chargingProfilePurpose")
ChargingProfilePurpose chargingProfilePurpose;
@Column(name = "startPeriod")
private int startPeriod;
@Column(name = "chargingProfileId")
private int chargingProfileId;
@Column(name = "limit")
private BigDecimal limit;
@Column(name = "numberPhases")
private int numberPhases;
@Column(name = "validTo", columnDefinition = "TIMESTAMP")
private LocalDateTime validTo;
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name="\"wrapper.messageId\"")
private SetChargingProfileConf conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment