package com.storycove.entity;

public class Library {
    private String id;
    private String name;
    private String description;
    private String passwordHash;
    private String dbName;
    private String typesenseCollection;
    private String imagePath;
    private boolean initialized;

    // Constructors
    public Library() {}

    public Library(String id, String name, String description, String passwordHash, String dbName) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.passwordHash = passwordHash;
        this.dbName = dbName;
        this.typesenseCollection = "stories_" + id;
        this.imagePath = "/images/" + id;
        this.initialized = false;
    }

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
        this.typesenseCollection = "stories_" + id;
        this.imagePath = "/images/" + id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPasswordHash() {
        return passwordHash;
    }

    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getTypesenseCollection() {
        return typesenseCollection;
    }

    public void setTypesenseCollection(String typesenseCollection) {
        this.typesenseCollection = typesenseCollection;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public boolean isInitialized() {
        return initialized;
    }

    public void setInitialized(boolean initialized) {
        this.initialized = initialized;
    }
}