package com.salpa.subject.domain;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class MonitorTableDocument {

    private Integer id;

    private Integer databaseDocumentId;

    private String name;

    private String type;

    private String comment;

    private LocalDateTime createAt;

    public MonitorTableDocument() {};

    public MonitorTableDocument(MonitorTableDocument value) {
        this.id = value.id;
        this.databaseDocumentId = value.databaseDocumentId;
        this.name = value.name;
        this.type = value.type;
        this.comment = value.comment;
        this.createAt = value.createAt;
    }

    public MonitorTableDocument(
            Integer       id,
            Integer       databaseDocumentId,
            String        name,
            String        type,
            String        comment,
            LocalDateTime createAt
    ) {
        this.id = id;
        this.databaseDocumentId = databaseDocumentId;
        this.name = name;
        this.type = type;
        this.comment = comment;
        this.createAt = createAt;
    }

    /*描述*/
    private String description;

    /*评论条数*/
    private Integer discussionCount;

    private List<MonitorTableColumnDocument> columns;

    private List<MonitorTableIndexDocument> indexes;

    private List<MonitorTableForeignKeyDocument> foreignKeys;

    private List<MonitorTableTriggerDocument> triggers;

    public Integer getId() {
        return id;
    }

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

    public Integer getDatabaseDocumentId() {
        return databaseDocumentId;
    }

    public void setDatabaseDocumentId(Integer databaseDocumentId) {
        this.databaseDocumentId = databaseDocumentId;
    }

    public String getName() {
        return name;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public LocalDateTime getCreateAt() {
        return createAt;
    }

    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    public String getDescription() {
        return description;
    }

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

    public Integer getDiscussionCount() {
        return discussionCount;
    }

    public void setDiscussionCount(Integer discussionCount) {
        this.discussionCount = discussionCount;
    }

    public List<MonitorTableColumnDocument> getColumns() {
        return columns;
    }

    public void setColumns(List<MonitorTableColumnDocument> columns) {
        this.columns = columns;
    }

    public List<MonitorTableIndexDocument> getIndexes() {
        return indexes;
    }

    public void setIndexes(List<MonitorTableIndexDocument> indexes) {
        this.indexes = indexes;
    }

    public List<MonitorTableForeignKeyDocument> getForeignKeys() {
        return foreignKeys;
    }

    public void setForeignKeys(List<MonitorTableForeignKeyDocument> foreignKeys) {
        this.foreignKeys = foreignKeys;
    }

    public List<MonitorTableTriggerDocument> getTriggers() {
        return triggers;
    }

    public void setTriggers(List<MonitorTableTriggerDocument> triggers) {
        this.triggers = triggers;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("TableDocument (");

        sb.append(id);
        sb.append(", ").append(databaseDocumentId);
        sb.append(", ").append(name);
        sb.append(", ").append(type);
        sb.append(", ").append(comment);
        sb.append(", ").append(createAt);

        sb.append(")");
        return sb.toString();
    }
}
