package com.zhongshu.card.server.core.domain.org;

import com.zhongshu.card.client.type.DataState;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户分组信息
 *
 * @author TRX
 * @date 2024/12/19
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
public class UserGroup extends SuperMain {

    @Schema(description = "分组名称")
    private String name;

    private DataState state = DataState.Enable;

    @Schema(description = "关联的用户数量")
    private Long number = 0L;

    public static UserGroup build(String id) {
        UserGroup entity = new UserGroup();
        entity.setId(id);
        return entity;
    }
}
