package com.bcxin.tenant.domain.events;

import com.bcxin.Infrastructures.enums.MemberType;
import com.bcxin.Infrastructures.events.DomainEventAbstract;
import lombok.Getter;

import java.util.Collection;

@Getter
public class MemberCreatedEvent extends DomainEventAbstract<String> {

    private final String id;
    private final String organizationId;

    private final MemberType memberType;

    private final String name;

    private final String telephone;

    private final String organizationName;

    private final Collection<String> adminIds;

    private final boolean ignoreTUser;


    public MemberCreatedEvent(String id, String organizationId, MemberType memberType, String name,
                              String telephone, String organizationName,Collection<String> adminIds,
                              boolean ignoreTUser) {
        super(id);
        this.id = id;
        this.organizationId = organizationId;
        this.memberType = memberType;
        this.name = name;
        this.telephone = telephone;
        this.organizationName = organizationName;
        this.adminIds = adminIds;
        this.ignoreTUser = ignoreTUser;
    }

    public static MemberCreatedEvent create(String id, String organizationId, MemberType memberType, String name,
                                            String telephone, String organizationName,Collection<String> adminIds,boolean ignoreTUser) {
        return new MemberCreatedEvent(id, organizationId, memberType, name, telephone, organizationName,adminIds,ignoreTUser);
    }
}
