package org.jeecg.modules.adweb.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * “Adweb会员”主账户和子账户对应关系
 */
@Data
@TableName("master_sub_account_relation")
@EqualsAndHashCode(callSuper = false)
@Schema(description="MasterSubAccountRelation")
public class MasterSubAccountRelation implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 子账户ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "子账户ID")
    private String subId;
    /**
     * 主账户ID
     */
    @Schema(description = "主账户ID")
    private String masterId;

    /**
     * 子账户名
     */
    @Schema(description = "子账户名")
    private String subName;
    /**
     * 主账户名
     */
    @Schema(description = "主账户名")
    private String masterName;

    /**
     * 状态, 1:有效, 0:无效
     */
    @Schema(description = "状态")
    private Integer status;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "createTime")
    private Date createTime;
}