package cn.reghao.tnb.content.app.chat.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import cn.reghao.tnb.content.app.chat.model.dto.group.EditGroupNotice;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author reghao
 * @date 2022-04-28 17:11:09
 */
@NoArgsConstructor
@Getter
public class GroupNotice extends BaseObject<Integer> {
    private Integer noticeId;
    private Integer groupId;
    private String title;
    private String content;
    private Boolean top;
    private Boolean confirmed;
    private Long createBy;

    public GroupNotice(EditGroupNotice editGroupNotice, long userId) {
        this.noticeId = editGroupNotice.getNoticeId();
        this.groupId = editGroupNotice.getGroupId();
        this.title = editGroupNotice.getTitle();
        this.content = editGroupNotice.getContent();
        this.top = editGroupNotice.isTop();
        this.confirmed = editGroupNotice.isConfirm();
        this.createBy = userId;
    }
}
