|
|
@ -1,111 +1,111 @@ |
|
|
|
|
|
|
|
--订单地址管理 |
|
|
|
create table tb_address ( |
|
|
|
id int identity, --自增ID |
|
|
|
userid int null default 0, --会员ID |
|
|
|
name nvarchar(100) null, --收件人 |
|
|
|
mobile nvarchar(20) null default'', --联系电话 |
|
|
|
zipcode nvarchar(20) null default'', --邮政编码 |
|
|
|
province nvarchar(100) null default'', --省 |
|
|
|
city nvarchar(100) null default'', --市 |
|
|
|
area nvarchar(100) null default'', --区 |
|
|
|
xxaddress nvarchar(255) null default'', --详细地址 |
|
|
|
paixu int null default 0, --排序 |
|
|
|
state int null default 0, --是否设为默认收货地址{0/是,1/否} |
|
|
|
stateaddress int null default 0, --是否为有效地址{0/是,1/否} |
|
|
|
add_time datetime null default getdate(), --地址创建日期 |
|
|
|
constraint PK_TB_ADDRESS primary key (id) |
|
|
|
) |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'自增阿弟', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'id' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'会员ID', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'userid' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'收件人', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'name' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'联系电话', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'mobile' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'邮政编码', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'zipcode' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'省', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'province' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'市', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'city' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'区', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'area' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'详细地址', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'xxaddress' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'排序', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'paixu' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'是否设为默认收货地址{0/是,1/否}', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'state' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'是否为有效地址{0/是,1/否}', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'stateaddress' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'地址创建日期', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'add_time' |
|
|
|
go |
|
|
|
|
|
|
|
|
|
|
|
--订单地址管理 |
|
|
|
create table tb_address ( |
|
|
|
id int identity, --自增ID |
|
|
|
userid int null default 0, --会员ID |
|
|
|
name nvarchar(100) null, --收件人 |
|
|
|
mobile nvarchar(20) null default'', --联系电话 |
|
|
|
zipcode nvarchar(20) null default'', --邮政编码 |
|
|
|
province nvarchar(100) null default'', --省 |
|
|
|
city nvarchar(100) null default'', --市 |
|
|
|
area nvarchar(100) null default'', --区 |
|
|
|
xxaddress nvarchar(255) null default'', --详细地址 |
|
|
|
paixu int null default 0, --排序 |
|
|
|
state int null default 0, --是否设为默认收货地址{0/是,1/否} |
|
|
|
stateaddress int null default 0, --是否为有效地址{0/是,1/否} |
|
|
|
add_time datetime null default getdate(), --地址创建日期 |
|
|
|
constraint PK_TB_ADDRESS primary key (id) |
|
|
|
) |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'自增阿弟', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'id' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'会员ID', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'userid' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'收件人', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'name' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'联系电话', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'mobile' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'邮政编码', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'zipcode' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'省', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'province' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'市', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'city' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'区', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'area' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'详细地址', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'xxaddress' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'排序', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'paixu' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'是否设为默认收货地址{0/是,1/否}', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'state' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'是否为有效地址{0/是,1/否}', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'stateaddress' |
|
|
|
go |
|
|
|
|
|
|
|
declare @CurrentUser sysname |
|
|
|
select @CurrentUser = user_name() |
|
|
|
execute sp_addextendedproperty 'MS_Description', |
|
|
|
'地址创建日期', |
|
|
|
'user', @CurrentUser, 'table', 'tb_address', 'column', 'add_time' |
|
|
|
go |
|
|
|
|