Просмотр исходного кода

feat: 新增butler_assignments实体与Mapper

iwt 2 месяцев назад
Родитель
Сommit
7f969c639c

+ 43 - 0
cfc-backend/src/main/java/com/etotem/cfc/entity/ButlerAssignment.java

@@ -0,0 +1,43 @@
+package com.etotem.cfc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 会员-管家分配记录(butler_assignments 表唯一 Java 写入方;
+ * 订阅激活自动分配只增 member_count 不建行,本表行仅由家庭自助选择/换绑与管理端解绑维护)
+ */
+@Data
+@TableName("butler_assignments")
+public class ButlerAssignment implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 家庭 ID(唯一键 uk_family_assignment)
+     */
+    private Long familyId;
+
+    /**
+     * 管家用户 ID
+     */
+    private Long butlerUserId;
+
+    /**
+     * 关联订阅 ID
+     */
+    private Long subscriptionId;
+
+    /**
+     * 订阅级别 L1/L2
+     */
+    private String level;
+
+    private Date assignedAt;
+}

+ 12 - 0
cfc-backend/src/main/java/com/etotem/cfc/mapper/ButlerAssignmentMapper.java

@@ -0,0 +1,12 @@
+package com.etotem.cfc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.etotem.cfc.entity.ButlerAssignment;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 会员-管家分配记录 Mapper(风格与 ButlerProfileMapper 一致)
+ */
+@Mapper
+public interface ButlerAssignmentMapper extends BaseMapper<ButlerAssignment> {
+}