package de.votian.services.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;

@Entity
@Table(name = "customerservice")
@IdClass(CustomerServiceAssignmentId.class)
public class CustomerServiceAssignment {

    @Id
    @Column(name = "cs_id")
    private Long customerId;

    @Id
    @Column(name = "srv_id")
    private Long serviceId;

    @Column(name = "cssrv_sort")
    private Integer sort;

    public CustomerServiceAssignment() {
    }

    public CustomerServiceAssignment(Long customerId, Long serviceId, Integer sort) {
        this.customerId = customerId;
        this.serviceId = serviceId;
        this.sort = sort;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
}
