T_BD_CONTACT(联系人) | |||||||
是否主键 | 字段名 | 字段描述 | 数据类型 | 长度 | 可空 | 缺省值 | 备注 |
✓ | FCONTACTID | 联系人内码 | int | 0 | |||
FMASTERID | 主数据内码 | int | 0 | ||||
FCREATEORGID | 创建组织内码 | int | 0 | ||||
FUSEORGID | 使用组织内码 | int | 0 | ||||
FCREATORID | 创建人内码 | int | 0 | ||||
FCREATEDATE | 创建日期 | datetime | getdate() | ||||
FMODIFIERID | 修改人内码 | int | 0 | ||||
FMODIFYDATE | 修改日期 | datetime | getdate() | ||||
FDOCUMENTSTATUS | 数据状态 | char | 1 | ||||
FFORBIDSTATUS | 禁用状态 | char | 1 | ||||
FNUMBER | 代码 | nvarchar | 255 | ||||
FTEL | 电话 | nvarchar | 20 | ||||
FMOBILE | 移动电话 | nvarchar | 20 | ||||
FFAX | 传真 | nvarchar | 30 | ||||
FEMAIL | 电子邮箱 | nvarchar | 80 | ||||
FIMCODE | 即时通讯 | nvarchar | 50 | ||||
FADDRESS | 地址 | nvarchar | 255 | ||||
备注:联系人主表 |
--建表脚本--
create table T_BD_CONTACT(
FCONTACTID int not null comment '联系人内码'
,FMASTERID int not null comment '主数据内码'
,FCREATEORGID int not null comment '创建组织内码'
,FUSEORGID int not null comment '使用组织内码'
,FCREATORID int not null comment '创建人内码'
,FCREATEDATE datetime not null comment '创建日期'
,FMODIFIERID int not null comment '修改人内码'
,FMODIFYDATE datetime not null comment '修改日期'
,FDOCUMENTSTATUS char(1) not null comment '数据状态'
,FFORBIDSTATUS char(1) not null comment '禁用状态'
,FNUMBER nvarchar(255) not null comment '代码'
,FTEL nvarchar(20) not null comment '电话'
,FMOBILE nvarchar(20) not null comment '移动电话'
,FFAX nvarchar(30) not null comment '传真'
,FEMAIL nvarchar(80) not null comment '电子邮箱'
,FIMCODE nvarchar(50) not null comment '即时通讯'
,FADDRESS nvarchar(255) not null comment '地址'
,primary key (FCONTACTID)
) comment = '联系人'
--查询--
select FCONTACTID as "fcontactid",FMASTERID as "fmasterid",FCREATEORGID as "fcreateorgid",FUSEORGID as "fuseorgid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FDOCUMENTSTATUS as "fdocumentstatus",FFORBIDSTATUS as "fforbidstatus",FNUMBER as "fnumber",FTEL as "ftel",FMOBILE as "fmobile",FFAX as "ffax",FEMAIL as "femail",FIMCODE as "fimcode",FADDRESS as "faddress" from T_BD_CONTACT
--查询(中文字段)--
select FCONTACTID as "联系人内码",FMASTERID as "主数据内码",FCREATEORGID as "创建组织内码",FUSEORGID as "使用组织内码",FCREATORID as "创建人内码",FCREATEDATE as "创建日期",FMODIFIERID as "修改人内码",FMODIFYDATE as "修改日期",FDOCUMENTSTATUS as "数据状态",FFORBIDSTATUS as "禁用状态",FNUMBER as "代码",FTEL as "电话",FMOBILE as "移动电话",FFAX as "传真",FEMAIL as "电子邮箱",FIMCODE as "即时通讯",FADDRESS as "地址" from T_BD_CONTACT
--INSERT脚本--
insert into T_BD_CONTACT(FCONTACTID,FMASTERID,FCREATEORGID,FUSEORGID,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FDOCUMENTSTATUS,FFORBIDSTATUS,FNUMBER,FTEL,FMOBILE,FFAX,FEMAIL,FIMCODE,FADDRESS) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update T_BD_CONTACT set FCONTACTID=?,FMASTERID=?,FCREATEORGID=?,FUSEORGID=?,FCREATORID=?,FCREATEDATE=?,FMODIFIERID=?,FMODIFYDATE=?,FDOCUMENTSTATUS=?,FFORBIDSTATUS=?,FNUMBER=?,FTEL=?,FMOBILE=?,FFAX=?,FEMAIL=?,FIMCODE=?,FADDRESS=? where FCONTACTID=?
--delete脚本--
delete from T_BD_CONTACT where FCONTACTID=?
--给字段加备注--
alter table T_BD_CONTACT comment '联系人';
alter table T_BD_CONTACT modify column FCONTACTID int not null comment '联系人内码';
alter table T_BD_CONTACT modify column FMASTERID int not null comment '主数据内码';
alter table T_BD_CONTACT modify column FCREATEORGID int not null comment '创建组织内码';
alter table T_BD_CONTACT modify column FUSEORGID int not null comment '使用组织内码';
alter table T_BD_CONTACT modify column FCREATORID int not null comment '创建人内码';
alter table T_BD_CONTACT modify column FCREATEDATE datetime not null comment '创建日期';
alter table T_BD_CONTACT modify column FMODIFIERID int not null comment '修改人内码';
alter table T_BD_CONTACT modify column FMODIFYDATE datetime not null comment '修改日期';
alter table T_BD_CONTACT modify column FDOCUMENTSTATUS char(1) not null comment '数据状态';
alter table T_BD_CONTACT modify column FFORBIDSTATUS char(1) not null comment '禁用状态';
alter table T_BD_CONTACT modify column FNUMBER nvarchar(255) not null comment '代码';
alter table T_BD_CONTACT modify column FTEL nvarchar(20) not null comment '电话';
alter table T_BD_CONTACT modify column FMOBILE nvarchar(20) not null comment '移动电话';
alter table T_BD_CONTACT modify column FFAX nvarchar(30) not null comment '传真';
alter table T_BD_CONTACT modify column FEMAIL nvarchar(80) not null comment '电子邮箱';
alter table T_BD_CONTACT modify column FIMCODE nvarchar(50) not null comment '即时通讯';
alter table T_BD_CONTACT modify column FADDRESS nvarchar(255) not null comment '地址';
T_BD_CONTACT_L(联系人多语言) | |||||||
是否主键 | 字段名 | 字段描述 | 数据类型 | 长度 | 可空 | 缺省值 | 备注 |
✓ | FPKID | 多语言数据内码 | int | 0 | |||
FCONTACTID | 联系人内码 | int | 0 | ||||
FLOCALEID | 多语言标示 | int | 0 | ||||
FNAME | 名称 | nvarchar | 255 | ||||
FDESCRIPTION | 描述 | nvarchar | 255 | ||||
备注:联系人多语言表 |
--建表脚本--
create table T_BD_CONTACT_L(
FPKID int not null comment '多语言数据内码'
,FCONTACTID int not null comment '联系人内码'
,FLOCALEID int not null comment '多语言标示'
,FNAME nvarchar(255) not null comment '名称'
,FDESCRIPTION nvarchar(255) not null comment '描述'
,primary key (FPKID)
) comment = '联系人多语言'
--查询--
select FPKID as "fpkid",FCONTACTID as "fcontactid",FLOCALEID as "flocaleid",FNAME as "fname",FDESCRIPTION as "fdescription" from T_BD_CONTACT_L
--查询(中文字段)--
select FPKID as "多语言数据内码",FCONTACTID as "联系人内码",FLOCALEID as "多语言标示",FNAME as "名称",FDESCRIPTION as "描述" from T_BD_CONTACT_L
--INSERT脚本--
insert into T_BD_CONTACT_L(FPKID,FCONTACTID,FLOCALEID,FNAME,FDESCRIPTION) values (?,?,?,?,?)
--UPDATE脚本--
update T_BD_CONTACT_L set FPKID=?,FCONTACTID=?,FLOCALEID=?,FNAME=?,FDESCRIPTION=? where FPKID=?
--delete脚本--
delete from T_BD_CONTACT_L where FPKID=?
--给字段加备注--
alter table T_BD_CONTACT_L comment '联系人多语言';
alter table T_BD_CONTACT_L modify column FPKID int not null comment '多语言数据内码';
alter table T_BD_CONTACT_L modify column FCONTACTID int not null comment '联系人内码';
alter table T_BD_CONTACT_L modify column FLOCALEID int not null comment '多语言标示';
alter table T_BD_CONTACT_L modify column FNAME nvarchar(255) not null comment '名称';
alter table T_BD_CONTACT_L modify column FDESCRIPTION nvarchar(255) not null comment '描述';
推荐阅读