```[sql]
CREATE TABLE nfx_commission_distribution (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
serial_no VARCHAR(50) NOT NULL DEFAULT '' COMMENT '流水号',
shop_id INT(11) NOT NULL COMMENT '对应的店铺ID',
promoter_id INT(11) NOT NULL COMMENT '对应的推广员ID',
order_id INT(11) NOT NULL COMMENT '对应的订单ID',
order_goods_id INT(11) NOT NULL COMMENT '对应的订单项ID',
goods_money DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总金额实际卖价',
goods_cost DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总成本',
goods_return DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '商品利润',
promoter_level INT(11) NOT NULL COMMENT '对应推广员级次0本店1下级创造2下下级创造',
goods_commission_rate DECIMAL(10, 2) NOT NULL COMMENT '商品对应拿出的利润比率',
commission_rate DECIMAL(10, 2) NOT NULL COMMENT '获取的佣金比率',
commission_money DECIMAL(10, 4) NOT NULL COMMENT '获取的佣金金额',
is_issue TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已经发放 0 未发放 1已发放',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '推广员分销佣金';
CREATE TABLE nfx_commission_partner (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
serial_no VARCHAR(50) NOT NULL DEFAULT '' COMMENT '流水号',
shop_id INT(11) NOT NULL COMMENT '对应的店铺ID',
partner_id INT(11) NOT NULL COMMENT '对应的股东ID',
partner_level INT(11) NOT NULL DEFAULT 0 COMMENT '获取佣金的股东等级',
order_partner_id INT(11) NOT NULL DEFAULT 0 COMMENT '产生订单的股东',
order_id INT(11) NOT NULL COMMENT '对应的订单ID',
order_goods_id INT(11) NOT NULL COMMENT '对应的订单项ID',
goods_return DECIMAL(10, 4) NOT NULL COMMENT '商品利润',
goods_money DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总金额实际卖价',
goods_cost DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总成本',
goods_commission_rate DECIMAL(10, 2) NOT NULL COMMENT '商品利润分成总比率',
commission_rate DECIMAL(10, 2) NOT NULL COMMENT '获取的佣金比率',
commission_money DECIMAL(10, 4) NOT NULL COMMENT '获取的佣金金额',
is_issue TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已经发放 0未发放 1已发放',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '股东分红佣金';
CREATE TABLE nfx_commission_partner_global (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
serial_no VARCHAR(255) NOT NULL DEFAULT '' COMMENT '单据编号',
records_id INT(11) NOT NULL DEFAULT 0 COMMENT '记录id',
shop_id INT(11) NOT NULL COMMENT '店铺ID',
partner_id INT(11) NOT NULL COMMENT '股东ID',
uid INT(11) NOT NULL COMMENT '股东会员ID',
yingye_money DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '时间段内分红的店铺总额',
shop_value INT(11) NOT NULL DEFAULT 0 COMMENT '店铺总分值',
partner_value INT(11) NOT NULL DEFAULT 0 COMMENT '股东分值',
partner_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东分红佣金比率(分值比率)',
fenhong_money DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '分红金额',
start_time INT(11) DEFAULT 0 COMMENT '开始时间',
end_time INT(11) DEFAULT 0 COMMENT '结束时间',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '全球分红佣金记录表';
CREATE TABLE nfx_commission_partner_global_records (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
shop_id INT(11) NOT NULL COMMENT '店铺ID',
fenhong_money DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '分红总金额',
start_time INT(11) DEFAULT 0 COMMENT '分红开始时间',
end_time INT(11) DEFAULT 0 COMMENT '分红结束时间',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '股东分红整体记录表';
CREATE TABLE nfx_commission_region_agent (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '表主键',
shop_id INT(11) NOT NULL COMMENT '店铺id',
serial_no VARCHAR(50) NOT NULL DEFAULT '' COMMENT '流水号',
region_agent_id INT(11) NOT NULL COMMENT '区域代理ID',
uid INT(11) NOT NULL COMMENT '会员ID',
promoter_id INT(11) NOT NULL COMMENT '推广员id',
order_id INT(11) NOT NULL COMMENT '对应的订单ID',
order_goods_id INT(11) NOT NULL COMMENT '对应的订单项ID',
goods_money DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总金额实际卖价',
goods_cost DECIMAL(10, 2) NOT NULL COMMENT '订单项商品总成本',
goods_return DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '商品利润',
goods_commission_rate DECIMAL(10, 2) DEFAULT 0.00 COMMENT '商品利润分成总比率',
commission_type INT(11) NOT NULL DEFAULT 0 COMMENT '代理级别1.省级2.市级3.区级',
commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '佣金比率',
commission DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '实际佣金金额',
is_issue TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否发放 0未发放 1已发放',
remark VARCHAR(255) NOT NULL DEFAULT '' COMMENT '备注',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '区域代理佣金列表';
CREATE TABLE nfx_goods_commission_rate (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
goods_id INT(11) NOT NULL COMMENT '商品ID',
is_open TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否启用分销',
distribution_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '分销佣金比率',
partner_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东分红佣金比率',
global_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东全球分红比率',
distribution_team_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '分销团队分红佣金比率',
partner_team_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东团队分红佣金比率',
regionagent_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '区域代理分红佣金比率',
channelagent_commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '渠道代理分红佣金比率',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 136
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '商品佣金比率设置';
CREATE TABLE nfx_partner (
partner_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '股东ID',
promoter_id INT(11) NOT NULL DEFAULT 0 COMMENT '推广员ID',
parent_partner INT(11) NOT NULL COMMENT '上级股东',
uid INT(11) NOT NULL COMMENT '会员ID',
shop_id INT(11) NOT NULL COMMENT '店铺ID',
partner_level INT(11) NOT NULL COMMENT '股东等级',
is_audit TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否审核通过',
is_lock TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否被冻结',
register_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
audit_time INT(11) DEFAULT 0 COMMENT '审核通过时间',
lock_time INT(11) DEFAULT 0 COMMENT '冻结时间',
PRIMARY KEY (partner_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 2340
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '股东表';
CREATE TABLE nfx_partner_level (
level_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '等级ID',
level_money DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '等级条件(团队销售额)',
level_name VARCHAR(50) NOT NULL DEFAULT '' COMMENT '等级名称',
commission_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东分红佣金比率',
global_value DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '全球分红分值',
global_weight DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '全球分红权重',
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺id',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (level_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 8192
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '股东等级';
CREATE TABLE nfx_promoter (
promoter_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '推广员ID',
promoter_no VARCHAR(50) NOT NULL DEFAULT '' COMMENT '推广员编号',
parent_promoter INT(11) NOT NULL DEFAULT 0 COMMENT '上级推广员id',
uid INT(11) NOT NULL COMMENT '推广员对应会员ID',
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺ID',
promoter_level INT(11) NOT NULL DEFAULT 0 COMMENT '推广员等级',
promoter_shop_name VARCHAR(255) NOT NULL DEFAULT '' COMMENT '推广员店铺名称',
commission_cash DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '已提现佣金',
commossion_total DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '佣金总额',
order_total DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '销售总额',
is_lock TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否被冻结',
is_audit TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否已审核',
qrcode VARCHAR(255) NOT NULL DEFAULT '' COMMENT '推广二维码',
memo VARCHAR(255) NOT NULL DEFAULT '' COMMENT '备注',
lock_time INT(11) DEFAULT 0 COMMENT '冻结时间',
audit_time INT(11) DEFAULT 0 COMMENT '审核通过时间',
regidter_time INT(11) DEFAULT 0 COMMENT '申请时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
background_img VARCHAR(255) NOT NULL DEFAULT '' COMMENT '店铺背景图',
PRIMARY KEY (promoter_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1260
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '推广员表';
CREATE TABLE nfx_promoter_goods (
id INT(11) NOT NULL AUTO_INCREMENT,
promoter_id INT(11) NOT NULL DEFAULT 0 COMMENT '推广员id',
goods_id INT(11) NOT NULL DEFAULT 0 COMMENT '商品id',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 348
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '推广员商品';
CREATE TABLE nfx_promoter_level (
level_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '等级ID',
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺ID',
level_name VARCHAR(50) NOT NULL DEFAULT '' COMMENT '等级名称',
level_money DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '等级升级条件(销售额)',
level_0 DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '本店销售佣金比率',
level_1 DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '给上级的佣金比率',
level_2 DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '给上上级的佣金比率',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (level_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 2
AVG_ROW_LENGTH = 4096
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '推广员等级';
CREATE TABLE nfx_promoter_region_agent (
region_agent_id INT(10) NOT NULL AUTO_INCREMENT COMMENT '表主键',
shop_id INT(11) NOT NULL COMMENT '店铺id',
promoter_id INT(11) NOT NULL COMMENT '推广员ID',
uid INT(11) NOT NULL COMMENT '会员ID',
agent_type INT(11) NOT NULL DEFAULT 0 COMMENT '代理类型1.省代,2,市代3,区域代理',
agent_provinceid INT(11) NOT NULL DEFAULT 0 COMMENT '代理省份id',
agent_cityid INT(11) NOT NULL DEFAULT 0 COMMENT '代理市id',
agent_districtid INT(11) NOT NULL DEFAULT 0 COMMENT '代理区域id',
is_audit INT(11) NOT NULL DEFAULT 0 COMMENT '是否已经通过0.待审核1.通过-1.审核不通过2.取消',
remark VARCHAR(255) NOT NULL DEFAULT '' COMMENT '操作备注',
reg_time INT(11) DEFAULT 0 COMMENT '申请时间',
audit_time INT(11) DEFAULT 0 COMMENT '通过时间',
cancel_time INT(11) DEFAULT 0 COMMENT '取消时间',
real_name VARCHAR(50) NOT NULL DEFAULT '' COMMENT '真实姓名',
agent_mobile VARCHAR(11) NOT NULL DEFAULT '' COMMENT '手机号',
agent_address VARCHAR(255) NOT NULL DEFAULT '' COMMENT '地址',
PRIMARY KEY (region_agent_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 16384
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '推广员区域代理';
CREATE TABLE nfx_shop_commission_withdraw_config (
shop_id INT(11) NOT NULL COMMENT '店铺Id',
min_cash_money DECIMAL(10, 2) NOT NULL DEFAULT 100.00 COMMENT '最低提现金额为元',
div_money DECIMAL(10, 2) NOT NULL DEFAULT 100.00 COMMENT '提现金额为的整数倍',
PRIMARY KEY (shop_id)
)
ENGINE = INNODB
AVG_ROW_LENGTH = 8192
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '佣金(体现条件)提现条件(交易完成后即可提现)';
CREATE TABLE nfx_shop_config (
id INT(11) NOT NULL AUTO_INCREMENT,
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺id',
is_distribution_enable TINYINT(4) NOT NULL DEFAULT 0 COMMENT '分销是否启用 1开启 0关闭',
is_distribution_audit TINYINT(4) NOT NULL DEFAULT 0 COMMENT '推广员是否需要审核 0不审核 1审核',
is_regional_agent TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否开启区域代理 1开启 0关闭',
is_partner_enable TINYINT(4) NOT NULL DEFAULT 0 COMMENT '股东分红是否开启 1开启 0关闭',
is_global_enable TINYINT(4) NOT NULL DEFAULT 0 COMMENT '全球分红是否开启',
create_date INT(11) DEFAULT 0 COMMENT '创建时间',
modify_date INT(11) DEFAULT 0 COMMENT '修改时间',
is_distribution_start TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否开启推广员申请 1开启 0关闭',
is_distribution_set TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否将以前普通会员设置为推广员 1开启 0关闭',
distribution_use TINYINT(4) NOT NULL DEFAULT 0 COMMENT '分销佣金使用 0利润 1销售价格',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 2
AVG_ROW_LENGTH = 1820
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '店铺的分销配置表';
CREATE TABLE nfx_shop_member_association (
id INT(10) NOT NULL AUTO_INCREMENT COMMENT '表主键',
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺id',
uid INT(11) NOT NULL COMMENT '会员ID',
source_uid INT(11) NOT NULL DEFAULT 0 COMMENT '来源会员ID',
promoter_id INT(11) NOT NULL DEFAULT 0 COMMENT '自身推广员ID',
qrcode_template_id INT(11) NOT NULL DEFAULT 0 COMMENT '推广二维码模板ID',
partner_id INT(11) NOT NULL DEFAULT 0 COMMENT '自身股东id',
is_promoter TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否是推广员',
is_partner TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否是股东',
region_center_id TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否是区域代理',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 481
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '店铺会员关联表';
CREATE TABLE nfx_shop_region_agent_config (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
shop_id INT(11) NOT NULL COMMENT '店铺ID',
is_open TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否启用',
province_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '省代比率',
city_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '市代比率',
district_rate DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '区代比率',
application_require_province DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '省级申请业绩条件',
application_require_city DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '市代申请销售条件',
application_require_district DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '区代申请销售条件',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '修改时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 2
AVG_ROW_LENGTH = 4096
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '分销区域代理设置';
CREATE TABLE nfx_user_account (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
shop_id INT(11) NOT NULL COMMENT '店铺ID',
uid INT(11) NOT NULL COMMENT '用户ID',
commission DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '总佣金',
commission_cash DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '可提现佣金',
commission_withdraw DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '已提现佣金',
commission_locked DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '冻结中的金额',
commission_promoter DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '分销佣金',
commission_partner DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东分红',
commission_partner_global DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东全球分红',
commission_region_agent DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '区域代理佣金',
commission_partner_team DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '股东团队分红',
commission_promoter_team DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '推广员团队分红',
commission_channelagent DECIMAL(10, 2) NOT NULL DEFAULT 0.00 COMMENT '渠道代理分红',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
modify_time INT(11) DEFAULT 0 COMMENT '最新时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 1170
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '用户店铺账户统计';
CREATE TABLE nfx_user_account_records (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '表主键',
uid INT(11) NOT NULL COMMENT '会员ID',
shop_id INT(11) NOT NULL DEFAULT 0 COMMENT '店铺ID,0标示平台',
batchcode VARCHAR(50) NOT NULL DEFAULT '' COMMENT '流水号',
money DECIMAL(10, 4) NOT NULL DEFAULT 0.0000 COMMENT '发生金额',
account_type INT(11) NOT NULL DEFAULT 0 COMMENT '发生方式',
type_alis_id INT(11) NOT NULL DEFAULT 0 COMMENT '发生相关ID',
is_display TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否显示',
is_calculate TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否参与计算',
text VARCHAR(255) NOT NULL DEFAULT '' COMMENT '描述',
create_time INT(11) DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 234
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '会员账户账单(佣金)';
CREATE TABLE nfx_user_account_type (
type_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '类型ID',
type_name VARCHAR(50) NOT NULL COMMENT '类型名称',
sign TINYINT(1) NOT NULL DEFAULT 1 COMMENT '佣金或支出',
PRIMARY KEY (type_id)
)
ENGINE = INNODB
AUTO_INCREMENT = 11
AVG_ROW_LENGTH = 3276
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '会员账户获取或者减少类型';
CREATE TABLE nfx_user_bank_account (
id INT(11) NOT NULL AUTO_INCREMENT,
uid INT(11) NOT NULL COMMENT '会员id',
bank_type VARCHAR(50) NOT NULL DEFAULT '1' COMMENT '账号类型 1银行卡2支付宝',
branch_bank_name VARCHAR(50) DEFAULT NULL COMMENT '支行信息',
realname VARCHAR(50) NOT NULL DEFAULT '' COMMENT '真实姓名',
account_number VARCHAR(50) NOT NULL DEFAULT '' COMMENT '银行账号',
mobile VARCHAR(20) NOT NULL DEFAULT '' COMMENT '手机号',
is_default INT(11) NOT NULL DEFAULT 0 COMMENT '是否默认账号',
create_date INT(11) DEFAULT 0 COMMENT '创建日期',
modify_date INT(11) DEFAULT 0 COMMENT '修改日期',
PRIMARY KEY (id),
INDEX IDX_member_bank_account_uid (uid)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 16384
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '会员提现账号';
CREATE TABLE nfx_user_commission_withdraw (
id INT(11) NOT NULL AUTO_INCREMENT,
shop_id INT(11) NOT NULL COMMENT '店铺编号',
withdraw_no VARCHAR(255) NOT NULL DEFAULT '' COMMENT '提现流水号',
uid INT(11) NOT NULL COMMENT '分销商id',
bank_name VARCHAR(50) NOT NULL COMMENT '提现银行名称',
account_number VARCHAR(50) NOT NULL COMMENT '提现银行账号',
realname VARCHAR(10) NOT NULL COMMENT '提现账户姓名',
mobile VARCHAR(20) NOT NULL COMMENT '手机',
cash DECIMAL(10, 2) NOT NULL COMMENT '提现金额',
status SMALLINT(6) NOT NULL DEFAULT 0 COMMENT '当前状态 0已申请(等待处理) 1已同意 -1 已拒绝',
memo VARCHAR(255) NOT NULL DEFAULT '' COMMENT '备注',
ask_for_date INT(11) DEFAULT 0 COMMENT '提现日期',
payment_date INT(11) DEFAULT 0 COMMENT '到账日期',
modify_date INT(11) DEFAULT 0 COMMENT '修改日期',
PRIMARY KEY (id)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
AVG_ROW_LENGTH = 4096
CHARACTER SET utf8
COLLATE utf8_general_ci
COMMENT = '佣金提现记录表';
```