序号 | 列名 | 数据类型 | 长度 | 小数位 | 标识 | 主键 | 外键 | 允许空 | 默认值 | 说明 |
1 | ID | int | 4 | 0 | 是 | 是 | 否 | |||
2 | UserID | int | 4 | 0 | 是 | |||||
3 | PUserID | int | 4 | 0 | 是 | 用户推荐人ID | ||||
4 | MType | int | 4 | 0 | 是 | 消费记录类型 | ||||
5 | AMount | money | 8 | 4 | 是 | 消费额 | ||||
6 | CDate | datetime | 8 | 3 | 是 | |||||
7 | UnitPercent | nvarchar | 50 | 0 | 是 | 分成比率 | ||||
8 | UnitAmount | money | 8 | 4 | 是 | 分成金额 | ||||
9 | State | int | 4 | 0 | 是 | 消费记录状态 | ||||
10 | Remind | nvarchar | 200 | 0 | 是 | |||||
11 | Detail | nvarchar | 200 | 0 | 是 | 消息记录详情 | ||||
12 | BindID | int | 4 | 0 | 是 | 绑定分成ID | ||||
13 | ChildAMount | money | 8 | 4 | 是 | 消费金额汇总 | ||||
14 | RealUnit | money | 8 | 4 | 是 | 消费分成记录 | ||||
15 | RealUnit0 | money | 8 | 4 | 是 | 消费分成记录 | ||||
16 | RealUnit10 | money | 8 | 4 | 是 | 消费分成记录 | ||||
17 | RealUnit20 | money | 8 | 4 | 是 | 消费分成记录 | ||||
18 | RealUnit30 | money | 8 | 4 | 是 | 消费分成记录 | ||||
19 | ChildIDS | varchar | 8000 | 0 | 是 |
用户消费成分表
GO
CREATE TABLE [dbo].[ZL_User_Consume](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [int] NULL,
[PUserID] [int] NULL,
[MType] [int] NULL,
[AMount] [money] NULL,
[CDate] [datetime] NULL,
[UnitPercent] [nvarchar](50) NULL,
[UnitAmount] [money] NULL,
[State] [int] NULL,
[Remind] [nvarchar](200) NULL,
[Detail] [nvarchar](200) NULL,
[BindID] [int] NULL,
CONSTRAINT [PK_ZL_User_Consume] PRIMARY KEY CLUSTERED
([ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
detele from ZL_User_Consume
drop table ZL_User_Consume
TRUNCATE table ZL_User_Consume