package com.pressing.domain.catalog;

import com.pressing.common.entity.SiteScopedEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "articles")
public class Article extends SiteScopedEntity {

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "article_type_id")
    private ArticleType articleType;

    @Column(nullable = false, length = 160)
    private String label;

    @Column(nullable = false)
    private boolean active = true;
}





/*package com.pressing.domain.catalog;

import com.pressing.common.entity.SiteScopedEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "articles")
public class Article extends SiteScopedEntity {

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(name = "article_type_id")
    private ArticleType articleType;

    @Column(nullable = false, length = 160)
    private String label;

    @Column(length = 80)
    private String sku;

    @Column(length = 255)
    private String description;

    @Column(nullable = false)
    private boolean active = true;
}
*/