package com.zsc.edu.gateway.domain.message;

import com.zsc.edu.gateway.modules.message.entity.Notice;
import com.zsc.edu.gateway.modules.message.entity.NoticeType;

public class NoticeBuilder {
    public NoticeType type;
    public String title;
    public String content;

    public static NoticeBuilder bMessage() {
        return new NoticeBuilder();
    }

    public NoticeBuilder type(NoticeType type) {
        this.type = type;
        return this;
    }

    public NoticeBuilder title(String title) {
        this.title = title;
        return this;
    }

    public NoticeBuilder content(String content) {
        this.content = content;
        return this;
    }

    public Notice build() {
        Notice notice = new Notice();
        notice.setTitle(title);
        notice.setContent(content);
        notice.type = NoticeType.MESSAGE;
        return notice;
    }
}
