-- Create table create table BAS_BUSINESSLINES ( businessid NUMBER, businessname VARCHAR2(255), channel NUMBER, ctime DATE, utime DATE ) tablespace UPDEV_DATA pctfree 10 initrans 1 maxtrans 255; -- Add comments to the table comment on table BAS_BUSINESSLINES is '业务线表'; -- Add comments to the columns comment on column BAS_BUSINESSLINES.businessid is '业务线ID'; comment on column BAS_BUSINESSLINES.businessname is '业务线名称'; comment on column BAS_BUSINESSLINES.channel is '默认渠道'; comment on column BAS_BUSINESSLINES.ctime is '创建时间'; comment on column BAS_BUSINESSLINES.utime is '更新时间'; -- Create table create table BAS_BUSINESSDEPARTMENT ( id NUMBER not null, businessid NUMBER, deptid NUMBER, depttype NUMBER, ctime DATE, utime DATE ) tablespace UPDEV_DATA pctfree 10 initrans 1 maxtrans 255; -- Add comments to the table comment on table BAS_BUSINESSDEPARTMENT is '业务线部门表'; -- Add comments to the columns comment on column BAS_BUSINESSDEPARTMENT.id is '主键ID'; comment on column BAS_BUSINESSDEPARTMENT.businessid is '业务线ID'; comment on column BAS_BUSINESSDEPARTMENT.deptid is '部门ID'; comment on column BAS_BUSINESSDEPARTMENT.depttype is '1、主部门 2、子部门'; comment on column BAS_BUSINESSDEPARTMENT.ctime is '创建时间'; comment on column BAS_BUSINESSDEPARTMENT.utime is '更新时间'; -- Create/Recreate primary, unique and foreign key constraints alter table BAS_BUSINESSDEPARTMENT add primary key (ID) using index tablespace UPDEV_DATA pctfree 10 initrans 2 maxtrans 255; -- Create table create table BAS_BUSINESSCUSTOMER ( id NUMBER not null, businessid NUMBER, customerfrom NVARCHAR2(255), resid NVARCHAR2(255), ctime DATE, utime DATE ) tablespace UPDEV_DATA pctfree 10 initrans 1 maxtrans 255; -- Add comments to the table comment on table BAS_BUSINESSCUSTOMER is '资源业务线关系表'; -- Add comments to the columns comment on column BAS_BUSINESSCUSTOMER.id is '主键ID'; comment on column BAS_BUSINESSCUSTOMER.businessid is '业务线ID'; comment on column BAS_BUSINESSCUSTOMER.customerfrom is '来源'; comment on column BAS_BUSINESSCUSTOMER.resid is 'RESID'; comment on column BAS_BUSINESSCUSTOMER.ctime is '创建时间'; comment on column BAS_BUSINESSCUSTOMER.utime is '更新时间'; -- Create/Recreate primary, unique and foreign key constraints alter table BAS_BUSINESSCUSTOMER add primary key (ID) using index tablespace UPDEV_DATA pctfree 10 initrans 2 maxtrans 255; -- Create table create table BAS_BUSINESSCHANNEL ( id NUMBER not null, businessid NUMBER, minchannel NUMBER, maxchannel NUMBER, ctime DATE, utime DATE ) tablespace UPDEV_DATA pctfree 10 initrans 1 maxtrans 255; -- Add comments to the table comment on table BAS_BUSINESSCHANNEL is '业务线渠道段表'; -- Add comments to the columns comment on column BAS_BUSINESSCHANNEL.id is '主键ID'; comment on column BAS_BUSINESSCHANNEL.businessid is '业务线ID'; comment on column BAS_BUSINESSCHANNEL.minchannel is '最小渠道'; comment on column BAS_BUSINESSCHANNEL.maxchannel is '最大渠道'; comment on column BAS_BUSINESSCHANNEL.ctime is '创建时间'; comment on column BAS_BUSINESSCHANNEL.utime is '更新时间'; -- Create/Recreate primary, unique and foreign key constraints alter table BAS_BUSINESSCHANNEL add primary key (ID) using index tablespace UPDEV_DATA pctfree 10 initrans 2 maxtrans 255;