package com.example.demo.model;

import java.time.LocalDateTime;

/**
 * 业务数据实体模型。
 * 代表系统中的核心业务数据，支持从新增到归档的完整生命周期管理。
 */
public class BusinessItem {

    /** 业务数据ID */
    private Long id;

    /** 业务标题 */
    private String title;

    /** 业务内容 */
    private String content;

    /** 业务类型 */
    private String type;

    /** 创建人ID */
    private Long createdBy;

    /** 状态：draft-草稿, pending-待审核, approved-已通过, rejected-已驳回, archived-已归档 */
    private String status;

    /** 创建时间 */
    private LocalDateTime createTime;

    /** 修改时间 */
    private LocalDateTime updateTime;

    public BusinessItem() {
    }

    public BusinessItem(Long id, String title, String content, String type,
                        Long createdBy, String status) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.type = type;
        this.createdBy = createdBy;
        this.status = status;
        this.createTime = LocalDateTime.now();
        this.updateTime = LocalDateTime.now();
    }

    public Long getId() {
        return id;
    }

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

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getType() {
        return type;
    }

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

    public Long getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}
