package com.jeesharp.business.modules.marketing.memberTenant.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 会员-店铺租户关系实体，映射表 {@code app_member_tenant}。
 *
 * @author jeesharp
 * @since 2026-06-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("app_member_tenant")
@Schema(description = "会员-店铺租户关系")
public class MemberTenant extends BaseEntity<MemberTenant> {

    /**
     * 会员ID
     */
    @Schema(description = "会员ID")
    private String memberId;

    /**
     * 会员编号（冗余）
     */
    @Schema(description = "会员编号")
    private String memberNo;

    /**
     * 绑定状态：0-未绑定 1-已绑定 2-已解绑
     *
     * @see com.jeesharp.business.modules.marketing.memberTenant.enums.MemberTenantBindStatusEnum
     */
    @Schema(description = "绑定状态：0-未绑定 1-已绑定 2-已解绑")
    private Integer bindStatus;

    /**
     * 入会来源
     *
     * @see com.jeesharp.business.modules.marketing.memberTenant.enums.MemberTenantJoinSourceEnum
     */
    @Schema(description = "入会来源：QR_SCAN/ADMIN/IMPORT/MINI_APPLY")
    private String joinSource;

    /**
     * 推广渠道编码
     */
    @Schema(description = "推广渠道编码")
    private String channelCode;

    /**
     * 店铺内角色
     *
     * @see com.jeesharp.business.modules.marketing.memberTenant.enums.MemberTenantRoleEnum
     */
    @Schema(description = "店铺内角色：CUSTOMER/CLERK/MANAGER")
    private String memberRole;

    /**
     * 入会/绑定时间
     */
    @Schema(description = "入会时间")
    private LocalDateTime joinDate;

    /**
     * 解绑时间
     */
    @Schema(description = "解绑时间")
    private LocalDateTime unbindDate;
}
