package com.red.circle.other.infra.database.mongo.entity.team.team;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.other.infra.database.mongo.dto.team.TeamPolicy;
import java.io.Serial;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 政策管理.
 *
 * @author pengliang on 2022/12/1
 */
@Data
@Accessors(chain = true)
@Document("team_policy_manager")
public class TeamPolicyManager implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 记录id.
   */
  @Id
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /**
   * 归属系统.
   */
  private String sysOrigin;

  /**
   * 区域.
   */
  private String region;

  /**
   * true: 曾经对外发布过.
   */
  private Boolean historyRelease;

  /**
   * true已发布队外政策.
   */
  private Boolean release;

  /**
   * 标题.
   */
  private String title;

  /**
   * 政策.
   */
  private List<TeamPolicy> policy;

  /**
   * 类型 MONEY(美金政策)、SALARY_DIAMOND(工资钻石政策).
   */
  private String policyType;

  /**
   * 创建时间.
   */
  private Timestamp createTime;

  /**
   * 修改时间.
   */
  private Timestamp updateTime;

  /**
   * 创建用户.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createUser;

  /**
   * 修改用户.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateUser;

}
