更换用户和商铺id为雪花id
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.xiaowang.yuminailcore.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -14,10 +16,16 @@ import lombok.EqualsAndHashCode;
|
||||
* @date 2026-02-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_shop")
|
||||
public class ShopDO extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 店铺唯一主键ID(雪花ID)
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.xiaowang.yuminailcore.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -14,10 +16,16 @@ import lombok.EqualsAndHashCode;
|
||||
* @date 2026-02-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("t_user")
|
||||
public class UserDO extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户唯一主键ID(雪花ID)
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 所属店铺ID,关联店铺表主键(0表示无所属店铺)
|
||||
*/
|
||||
|
||||
@@ -190,7 +190,7 @@ create index idx_title
|
||||
-- 店铺信息表
|
||||
create table t_shop
|
||||
(
|
||||
id bigint unsigned auto_increment comment '店铺唯一主键ID'
|
||||
id bigint unsigned comment '店铺唯一主键ID(雪花ID)'
|
||||
primary key comment '店铺主键索引',
|
||||
shop_name varchar(100) not null comment '店铺名称',
|
||||
description text null comment '店铺描述',
|
||||
@@ -230,7 +230,7 @@ create table t_tag
|
||||
-- 系统用户信息表
|
||||
create table t_user
|
||||
(
|
||||
id bigint unsigned auto_increment comment '用户唯一主键ID(雪花ID)'
|
||||
id bigint unsigned comment '用户唯一主键ID(雪花ID)'
|
||||
primary key comment '用户主键索引',
|
||||
shop_id bigint unsigned default 0 null comment '所属店铺ID,关联店铺表主键(0表示无所属店铺)',
|
||||
nickname varchar(50) not null comment '用户昵称',
|
||||
|
||||
Reference in New Issue
Block a user