Subversion Repositories SmartDukaan

Rev

Rev 33516 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.brandFee;

import com.spice.profitmandi.dao.enumuration.onBorading.onBoardingFormEnums.StoreType;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "fofo.brand_fee")
public class BrandFee {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;
    @Column(name = "studio")
    private double studio;
    @Column(name = "arcade")
    private double arcade;
    @Column(name = "plaza")
    private double plaza;
    @Column(name = "special")
    private double special;
    @Column(name = "startDate")
    private LocalDateTime startDate;
    @Column(name = "endDate")
    private LocalDateTime endDate;

    public BrandFee() {
    }

    public BrandFee(double studio, double arcade, double plaza, double special, LocalDateTime startDate, LocalDateTime endDate) {
        this.studio = studio;
        this.arcade = arcade;
        this.plaza = plaza;
        this.special = special;
        this.startDate = startDate;
        this.endDate = endDate;
    }

    public double getFeeByStoreType(StoreType storeType) {
        switch (storeType) {
            case STUDIO:
                return this.studio;
            case PLAZA:
                return this.plaza;
            case ARCADE:
                return this.arcade;
            case SPECIAL:
                return this.special;
            default:
                return 0;
        }

    }

    public double getSpecial() {
        return special;
    }

    public void setSpecial(double special) {
        this.special = special;
    }

    public Long getId() {
        return id;
    }

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

    public double getStudio() {
        return studio;
    }

    public void setStudio(double studio) {
        this.studio = studio;
    }

    public double getArcade() {
        return arcade;
    }

    public void setArcade(double arcade) {
        this.arcade = arcade;
    }

    public double getPlaza() {
        return plaza;
    }

    public void setPlaza(double plaza) {
        this.plaza = plaza;
    }

    public LocalDateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }

    public LocalDateTime getEndDate() {
        return endDate;
    }

    public void setEndDate(LocalDateTime endDate) {
        this.endDate = endDate;
    }

    @Override
    public String toString() {
        return "BrandFee{" +
                "id=" + id +
                ", studio=" + studio +
                ", arcade=" + arcade +
                ", plaza=" + plaza +
                ", special=" + special +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                '}';
    }
}