package com.example.sleep;

import java.io.Serializable;
import java.util.List;

import java.io.Serializable;
import java.util.List;

// 事件类
public class Event implements Serializable {
    public String id;            // 事件的唯一标识符
    public String title;         // 事件的标题
    public String des;           // 事件的描述
    public String imageUrl;      // 事件的图片URL
    public List<EventContent> contents;  // 包含事件内容的列表

    // 事件类构造函数
    public Event(String id, String title, String des, String imageUrl, List<EventContent> contents) {
        this.id = id;
        this.title = title;
        this.des = des;
        this.imageUrl = imageUrl;
        this.contents = contents;
    }

    // 无参构造函数
    public Event() {
    }

    public String getId() {
        return id;
    }

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

    public String getTitle() {
        return title;
    }

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

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public List<EventContent> getContents() {
        return contents;
    }

    public void setContents(List<EventContent> contents) {
        this.contents = contents;
    }
}

// 事件内容类
class EventContent implements Serializable {
    public String contentId;  // 内容的唯一标识符
    public String userId;     // 用户的唯一标识符，与事件内容关联
    public String content;    // 事件的具体内容
    public String userName;   // 用户的名字

    // 事件内容类构造函数
    public EventContent(String contentId, String userId, String content, String userName) {
        this.contentId = contentId;
        this.userId = userId;
        this.content = content;
        this.userName = userName;
    }

    // 无参构造函数
    public EventContent() {
    }

    public String getContentId() {
        return contentId;
    }

    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

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

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}

