package com.jiayue.ipfcst.common.data.entity;

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.PvRotationModeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import javax.validation.constraints.Digits;
import java.math.BigDecimal;

/**
 * TODO
 *
 * @author yh
 * @version 1.0
 * @since 2019/12/11 12:54
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class PvModuleModel extends AbstractBaseEntity {
    /**
     * 光伏组件主键
     * 自增
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    @Column
    private Integer id;

    /*型号*/
    @Column
    private String model;

    /*单个装机容量*/
    @Column
    private String singleCap;

    /*最大工作电压*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal maximumExcitationVoltage;

    /*最大工作电流*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal maximumPowerCurrent;

    /*开路电压*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal openCircuitVoltage;

    /*短路电流*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal shortCircuitCurrent;

    /*组件工作效率*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal efficiencyOfWork;

    /*旋转方式*/
    @Column
    @Enumerated(EnumType.STRING)
    private PvRotationModeEnum rotationMode;

    /*安装倾斜度*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal gradient;

    /*单个光伏组件面积*/
    @Column
    @Digits(integer = 10, fraction = 2)
    private BigDecimal singleArea;

    @Column
    private String stationCode;

}
