3995 lines
107 KiB
MySQL
3995 lines
107 KiB
MySQL
-- Create table
|
||
create table SYS_USER_ROLE
|
||
(
|
||
user_id NUMBER not null,
|
||
role_id NUMBER not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_USER_ROLE
|
||
is '用户和角色关联表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_USER_ROLE.user_id
|
||
is '用户ID';
|
||
comment on column SYS_USER_ROLE.role_id
|
||
is '角色ID';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_USER_ROLE
|
||
add constraint PK_SYS_USER_ROLE primary key (USER_ID, ROLE_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_CARD_ISSUE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
ecard_number VARCHAR2(32),
|
||
id_card VARCHAR2(32),
|
||
card_status VARCHAR2(2),
|
||
card_serial_no VARCHAR2(32),
|
||
create_user VARCHAR2(50),
|
||
create_time DATE,
|
||
update_user VARCHAR2(50),
|
||
update_time DATE,
|
||
issue_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_CARD_ISSUE
|
||
is '发卡确认信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_CARD_ISSUE.id
|
||
is '主键';
|
||
comment on column BD_CARD_ISSUE.ecard_number
|
||
is 'e卡通号';
|
||
comment on column BD_CARD_ISSUE.id_card
|
||
is '身份证号码';
|
||
comment on column BD_CARD_ISSUE.card_status
|
||
is '卡状态 1未确认 2已确认';
|
||
comment on column BD_CARD_ISSUE.card_serial_no
|
||
is '卡序列号';
|
||
comment on column BD_CARD_ISSUE.create_user
|
||
is '创建人';
|
||
comment on column BD_CARD_ISSUE.create_time
|
||
is '创建时间';
|
||
comment on column BD_CARD_ISSUE.update_user
|
||
is '更新人';
|
||
comment on column BD_CARD_ISSUE.update_time
|
||
is '更新时间';
|
||
comment on column BD_CARD_ISSUE.issue_time
|
||
is '确认时间';
|
||
-- Create/Recreate indexes
|
||
create index ECARD_INDEX on BD_CARD_ISSUE (ECARD_NUMBER)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index IDCARD_INDEX on BD_CARD_ISSUE (ID_CARD)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_CREATE_TIME on BD_CARD_ISSUE (CREATE_TIME)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_ISSURE_TIME on BD_CARD_ISSUE (ISSUE_TIME)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_CARD_ISSUE
|
||
add constraint PK_BD_CARD_ISSUE primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_CUSTOMER
|
||
(
|
||
id VARCHAR2(50) not null,
|
||
ecard_number VARCHAR2(30),
|
||
user_name VARCHAR2(100),
|
||
pass_word VARCHAR2(100),
|
||
user_id VARCHAR2(32),
|
||
user_type CHAR(1),
|
||
status CHAR(2),
|
||
idcard VARCHAR2(60),
|
||
reg_time VARCHAR2(60),
|
||
mark VARCHAR2(32),
|
||
create_id VARCHAR2(32),
|
||
update_id VARCHAR2(32),
|
||
update_date VARCHAR2(32),
|
||
delflag CHAR(1),
|
||
salt VARCHAR2(20),
|
||
org_id VARCHAR2(32),
|
||
est_org_id VARCHAR2(32),
|
||
phone VARCHAR2(32),
|
||
txt_password VARCHAR2(32),
|
||
is_mgr VARCHAR2(32),
|
||
zhlx VARCHAR2(32),
|
||
tyh VARCHAR2(32),
|
||
first_login_flag VARCHAR2(1) default 0 not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 296M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_CUSTOMER
|
||
is '用户表';
|
||
-- Add comments to the columns
|
||
comment on column BD_CUSTOMER.ecard_number
|
||
is 'E卡通号';
|
||
comment on column BD_CUSTOMER.user_name
|
||
is '姓名';
|
||
comment on column BD_CUSTOMER.pass_word
|
||
is '密码';
|
||
comment on column BD_CUSTOMER.user_id
|
||
is '用户ID';
|
||
comment on column BD_CUSTOMER.user_type
|
||
is '1老师2学生3家长4学校管理员账号';
|
||
comment on column BD_CUSTOMER.status
|
||
is '用户状态';
|
||
comment on column BD_CUSTOMER.idcard
|
||
is '身份证号';
|
||
comment on column BD_CUSTOMER.reg_time
|
||
is '注册时间(创建时间)';
|
||
comment on column BD_CUSTOMER.create_id
|
||
is '创建人(sys_user表id)';
|
||
comment on column BD_CUSTOMER.update_id
|
||
is '修改人(sys_user表id)';
|
||
comment on column BD_CUSTOMER.update_date
|
||
is '修改时间';
|
||
comment on column BD_CUSTOMER.delflag
|
||
is '是否删除;0:正常;1:删除;';
|
||
comment on column BD_CUSTOMER.salt
|
||
is '盐加密';
|
||
comment on column BD_CUSTOMER.first_login_flag
|
||
is '是否第一次登录,0是,1否';
|
||
-- Create/Recreate indexes
|
||
create index INDEX_BD_CUSTOMER on BD_CUSTOMER (ID, USER_ID, IDCARD)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_BD_CUSTOMER1 on BD_CUSTOMER (ECARD_NUMBER)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_BD_CUSTOMER2 on BD_CUSTOMER (USER_ID)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_CUSTOMER
|
||
add constraint PK_BD_CUSTOMER primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 41M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
|
||
-- Create table
|
||
create table BD_CUSTOMER_PARENT
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
relationship CHAR(2),
|
||
parent_name VARCHAR2(100),
|
||
whether_mainland_people CHAR(2),
|
||
gender CHAR(2),
|
||
employer VARCHAR2(500),
|
||
career VARCHAR2(10),
|
||
zpecialized_technical_job VARCHAR2(10),
|
||
job_level VARCHAR2(10),
|
||
political_status VARCHAR2(10),
|
||
contact_number VARCHAR2(20),
|
||
marital_status CHAR(2),
|
||
overseas_residence VARCHAR2(10),
|
||
contact_phone VARCHAR2(60),
|
||
passport_number VARCHAR2(100),
|
||
id_card_no VARCHAR2(60),
|
||
guardian_level CHAR(1),
|
||
student_id VARCHAR2(32),
|
||
student_real_flag CHAR(1),
|
||
jhrsort NUMBER
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 72M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_CUSTOMER_PARENT
|
||
is '监护人关系表';
|
||
-- Add comments to the columns
|
||
comment on column BD_CUSTOMER_PARENT.relationship
|
||
is '关系';
|
||
comment on column BD_CUSTOMER_PARENT.parent_name
|
||
is '监护人姓名';
|
||
comment on column BD_CUSTOMER_PARENT.whether_mainland_people
|
||
is '是否大陆人士';
|
||
comment on column BD_CUSTOMER_PARENT.gender
|
||
is '性别';
|
||
comment on column BD_CUSTOMER_PARENT.employer
|
||
is '工作单位';
|
||
comment on column BD_CUSTOMER_PARENT.career
|
||
is '职业';
|
||
comment on column BD_CUSTOMER_PARENT.zpecialized_technical_job
|
||
is '专业技术职务';
|
||
comment on column BD_CUSTOMER_PARENT.job_level
|
||
is '职务级别';
|
||
comment on column BD_CUSTOMER_PARENT.political_status
|
||
is '政治面貌';
|
||
comment on column BD_CUSTOMER_PARENT.contact_number
|
||
is '联系电话';
|
||
comment on column BD_CUSTOMER_PARENT.marital_status
|
||
is '婚姻状况';
|
||
comment on column BD_CUSTOMER_PARENT.overseas_residence
|
||
is '侨居地';
|
||
comment on column BD_CUSTOMER_PARENT.contact_phone
|
||
is '联系手机';
|
||
comment on column BD_CUSTOMER_PARENT.passport_number
|
||
is '护照号';
|
||
comment on column BD_CUSTOMER_PARENT.id_card_no
|
||
is '身份证号';
|
||
comment on column BD_CUSTOMER_PARENT.guardian_level
|
||
is '监护人级别';
|
||
comment on column BD_CUSTOMER_PARENT.student_id
|
||
is '学生表id';
|
||
comment on column BD_CUSTOMER_PARENT.student_real_flag
|
||
is '是否正式数据;0:正式数据;1:非正式数据;';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_CUSTOMER_PARENT
|
||
add constraint PK_BD_CUSTOMER_PARENT primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 17M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_EXCHANGE_CLASS
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
ydbh VARCHAR2(10),
|
||
status NUMBER(2),
|
||
stu_no VARCHAR2(32),
|
||
exchange_date DATE,
|
||
exchange_content VARCHAR2(200),
|
||
check_date DATE,
|
||
check_content VARCHAR2(200),
|
||
check_no VARCHAR2(24),
|
||
sour_class_no VARCHAR2(30),
|
||
sour_grade_no VARCHAR2(30),
|
||
now_class_no VARCHAR2(30),
|
||
now_grade_no VARCHAR2(30),
|
||
school_id VARCHAR2(30),
|
||
check_user VARCHAR2(32),
|
||
apply_user VARCHAR2(32),
|
||
apply_date DATE,
|
||
mdy_user VARCHAR2(32),
|
||
mdy_date DATE,
|
||
del_flag CHAR(1)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 10M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_EXCHANGE_CLASS
|
||
is '转班记录表';
|
||
-- Add comments to the columns
|
||
comment on column BD_EXCHANGE_CLASS.id
|
||
is '编号';
|
||
comment on column BD_EXCHANGE_CLASS.ydbh
|
||
is '异动编号';
|
||
comment on column BD_EXCHANGE_CLASS.status
|
||
is '0目标班级班主任申请1学校管理员审核通过2学校管理员审核不通过';
|
||
comment on column BD_EXCHANGE_CLASS.stu_no
|
||
is '学生编号';
|
||
comment on column BD_EXCHANGE_CLASS.exchange_date
|
||
is '调班日期';
|
||
comment on column BD_EXCHANGE_CLASS.exchange_content
|
||
is '调班说明';
|
||
comment on column BD_EXCHANGE_CLASS.check_date
|
||
is '审批日期';
|
||
comment on column BD_EXCHANGE_CLASS.check_content
|
||
is '审批理由';
|
||
comment on column BD_EXCHANGE_CLASS.check_no
|
||
is '审批文号';
|
||
comment on column BD_EXCHANGE_CLASS.sour_class_no
|
||
is '原班号';
|
||
comment on column BD_EXCHANGE_CLASS.sour_grade_no
|
||
is '原年级';
|
||
comment on column BD_EXCHANGE_CLASS.now_class_no
|
||
is '现班号';
|
||
comment on column BD_EXCHANGE_CLASS.now_grade_no
|
||
is '现年级';
|
||
comment on column BD_EXCHANGE_CLASS.school_id
|
||
is '学校编号';
|
||
comment on column BD_EXCHANGE_CLASS.check_user
|
||
is '审批人';
|
||
comment on column BD_EXCHANGE_CLASS.apply_user
|
||
is '申请人';
|
||
comment on column BD_EXCHANGE_CLASS.apply_date
|
||
is '申请日期';
|
||
comment on column BD_EXCHANGE_CLASS.mdy_user
|
||
is '修改人';
|
||
comment on column BD_EXCHANGE_CLASS.mdy_date
|
||
is '修改日期';
|
||
comment on column BD_EXCHANGE_CLASS.del_flag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_EXCHANGE_CLASS
|
||
add constraint PK_BD_EXCHANGE_CLASS primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 2M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_E_CARD
|
||
(
|
||
id NUMBER not null,
|
||
ecard_no VARCHAR2(10),
|
||
delflag CHAR(1) default 0,
|
||
serial_number VARCHAR2(5),
|
||
recyclingflag CHAR(1),
|
||
school_id VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 128K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_E_CARD
|
||
is 'E通卡卡号';
|
||
-- Add comments to the columns
|
||
comment on column BD_E_CARD.ecard_no
|
||
is 'e通卡卡号';
|
||
comment on column BD_E_CARD.delflag
|
||
is '删除标志位;0:正常;1:删除;';
|
||
comment on column BD_E_CARD.serial_number
|
||
is '流水号';
|
||
comment on column BD_E_CARD.recyclingflag
|
||
is '回收标志;';
|
||
comment on column BD_E_CARD.school_id
|
||
is '学校id';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_E_CARD
|
||
add constraint PK_BD_E_CARD primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_FLOW_GRADUATE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
graduation_year VARCHAR2(10),
|
||
graduation_grade VARCHAR2(32),
|
||
remark VARCHAR2(200),
|
||
graduation_type VARCHAR2(1),
|
||
create_user VARCHAR2(32),
|
||
create_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_FLOW_GRADUATE
|
||
is '毕业年级日志表';
|
||
-- Add comments to the columns
|
||
comment on column BD_FLOW_GRADUATE.graduation_year
|
||
is '毕业年份';
|
||
comment on column BD_FLOW_GRADUATE.graduation_grade
|
||
is '毕业年级';
|
||
comment on column BD_FLOW_GRADUATE.remark
|
||
is '备注';
|
||
comment on column BD_FLOW_GRADUATE.graduation_type
|
||
is '毕业类型(1手动毕业2自动毕业)';
|
||
comment on column BD_FLOW_GRADUATE.create_user
|
||
is '操作人';
|
||
comment on column BD_FLOW_GRADUATE.create_time
|
||
is '操作时间';
|
||
-- Create table
|
||
create table BD_FLOW_GRADUATE_USER
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
student_id VARCHAR2(32),
|
||
remark VARCHAR2(200),
|
||
create_user VARCHAR2(32),
|
||
create_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 832K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_FLOW_GRADUATE_USER
|
||
is '毕业人员日志表';
|
||
-- Add comments to the columns
|
||
comment on column BD_FLOW_GRADUATE_USER.id
|
||
is '主键';
|
||
comment on column BD_FLOW_GRADUATE_USER.student_id
|
||
is '人员id';
|
||
comment on column BD_FLOW_GRADUATE_USER.remark
|
||
is '备注';
|
||
comment on column BD_FLOW_GRADUATE_USER.create_user
|
||
is '创建人';
|
||
comment on column BD_FLOW_GRADUATE_USER.create_time
|
||
is '创建时间';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_FLOW_GRADUATE_USER
|
||
add constraint PK_BD_FLOW_GRADUATE_USER primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 384K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_FLOW_UPGRADE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
graduation_year VARCHAR2(10),
|
||
graduation_class VARCHAR2(32),
|
||
remark VARCHAR2(200),
|
||
graduation_type VARCHAR2(1),
|
||
create_user VARCHAR2(32),
|
||
create_time DATE,
|
||
target_class VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_FLOW_UPGRADE
|
||
is '升级班级日志表';
|
||
-- Add comments to the columns
|
||
comment on column BD_FLOW_UPGRADE.graduation_year
|
||
is '升级年份';
|
||
comment on column BD_FLOW_UPGRADE.graduation_class
|
||
is '升级班级';
|
||
comment on column BD_FLOW_UPGRADE.remark
|
||
is '备注';
|
||
comment on column BD_FLOW_UPGRADE.graduation_type
|
||
is '升级类型(1手动升级2自动升级)';
|
||
comment on column BD_FLOW_UPGRADE.create_user
|
||
is '操作人';
|
||
comment on column BD_FLOW_UPGRADE.create_time
|
||
is '操作时间';
|
||
comment on column BD_FLOW_UPGRADE.target_class
|
||
is '目标班级';
|
||
-- Create table
|
||
create table BD_IMAGE
|
||
(
|
||
id NUMBER,
|
||
user_id VARCHAR2(32),
|
||
type CHAR(1),
|
||
file_type CHAR(1),
|
||
url_prefix VARCHAR2(100),
|
||
file_src VARCHAR2(300),
|
||
img_thumbscr VARCHAR2(300),
|
||
img_composite VARCHAR2(300),
|
||
del_flag CHAR(1),
|
||
create_date DATE,
|
||
update_date DATE,
|
||
remarks VARCHAR2(200),
|
||
img_watermark_file VARCHAR2(200),
|
||
img_blind_watermark_file VARCHAR2(200)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_IMAGE
|
||
is '图片表';
|
||
-- Add comments to the columns
|
||
comment on column BD_IMAGE.id
|
||
is 'id';
|
||
comment on column BD_IMAGE.user_id
|
||
is '用户id(学生、教师)';
|
||
comment on column BD_IMAGE.type
|
||
is '1,学生,2教师';
|
||
comment on column BD_IMAGE.file_type
|
||
is '1,图片,2,其他文件';
|
||
comment on column BD_IMAGE.url_prefix
|
||
is 'url前缀';
|
||
comment on column BD_IMAGE.file_src
|
||
is '文件路径';
|
||
comment on column BD_IMAGE.img_thumbscr
|
||
is '缩略图径路';
|
||
comment on column BD_IMAGE.img_composite
|
||
is '合成图片径路';
|
||
comment on column BD_IMAGE.del_flag
|
||
is '是否删除,1是删除,0 正常';
|
||
comment on column BD_IMAGE.create_date
|
||
is '创建时间';
|
||
comment on column BD_IMAGE.update_date
|
||
is '修改时间';
|
||
comment on column BD_IMAGE.remarks
|
||
is '备注';
|
||
-- Create/Recreate indexes
|
||
create index USERID_TYPE_INDEX on BD_IMAGE (USER_ID, TYPE)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_MILITARYTRAIN
|
||
(
|
||
id NUMBER not null,
|
||
student_id NUMBER,
|
||
start_date DATE,
|
||
end_date DATE,
|
||
military_training VARCHAR2(40),
|
||
results VARCHAR2(20)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255;
|
||
-- Add comments to the table
|
||
comment on table BD_MILITARYTRAIN
|
||
is '军训数据表';
|
||
-- Add comments to the columns
|
||
comment on column BD_MILITARYTRAIN.id
|
||
is '编号';
|
||
comment on column BD_MILITARYTRAIN.student_id
|
||
is '学生编号';
|
||
comment on column BD_MILITARYTRAIN.start_date
|
||
is '军训起始日期';
|
||
comment on column BD_MILITARYTRAIN.end_date
|
||
is '军训终止日期';
|
||
comment on column BD_MILITARYTRAIN.military_training
|
||
is '军训部队';
|
||
comment on column BD_MILITARYTRAIN.results
|
||
is '军训成绩';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_MILITARYTRAIN
|
||
add constraint PK_BD_MILITARYTRAIN primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255;
|
||
-- Create table
|
||
create table BD_ORG_CLASS
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
classname VARCHAR2(100),
|
||
class_teacherno VARCHAR2(50),
|
||
class_monitorno VARCHAR2(20),
|
||
class_honorarytitle VARCHAR2(40),
|
||
educationalsystem VARCHAR2(10),
|
||
class_type VARCHAR2(10),
|
||
artsandsciences VARCHAR2(2),
|
||
graduatedate VARCHAR2(32),
|
||
createdate VARCHAR2(32),
|
||
createby VARCHAR2(32),
|
||
bilingualflag VARCHAR2(1),
|
||
bilingualtype VARCHAR2(10),
|
||
gradeid VARCHAR2(32),
|
||
ordernumber VARCHAR2(32),
|
||
update_by VARCHAR2(32),
|
||
update_date VARCHAR2(32),
|
||
delflag CHAR(1),
|
||
serial_number VARCHAR2(3),
|
||
class_alias VARCHAR2(20),
|
||
code_url VARCHAR2(200),
|
||
code_pic VARCHAR2(200)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the columns
|
||
comment on column BD_ORG_CLASS.classname
|
||
is '班级名称';
|
||
comment on column BD_ORG_CLASS.class_teacherno
|
||
is '班主任工号';
|
||
comment on column BD_ORG_CLASS.class_monitorno
|
||
is '班长学号';
|
||
comment on column BD_ORG_CLASS.class_honorarytitle
|
||
is '班级荣誉称号';
|
||
comment on column BD_ORG_CLASS.educationalsystem
|
||
is '学制';
|
||
comment on column BD_ORG_CLASS.class_type
|
||
is '班级类型码';
|
||
comment on column BD_ORG_CLASS.artsandsciences
|
||
is 'artsandsciences';
|
||
comment on column BD_ORG_CLASS.graduatedate
|
||
is 'graduatedate';
|
||
comment on column BD_ORG_CLASS.createdate
|
||
is '创建日期';
|
||
comment on column BD_ORG_CLASS.createby
|
||
is '创建人';
|
||
comment on column BD_ORG_CLASS.bilingualflag
|
||
is '是否少数民族双语教学班';
|
||
comment on column BD_ORG_CLASS.bilingualtype
|
||
is '双语教学模式码';
|
||
comment on column BD_ORG_CLASS.gradeid
|
||
is '所属年级(BD_ORG_GRADE表id)';
|
||
comment on column BD_ORG_CLASS.ordernumber
|
||
is '序号';
|
||
comment on column BD_ORG_CLASS.update_by
|
||
is '修改人';
|
||
comment on column BD_ORG_CLASS.update_date
|
||
is '修改时间';
|
||
comment on column BD_ORG_CLASS.delflag
|
||
is '是否删除;0:正常;1:删除';
|
||
comment on column BD_ORG_CLASS.serial_number
|
||
is '流水号(2019-08-01更改为班级序号)';
|
||
comment on column BD_ORG_CLASS.class_alias
|
||
is '班级别名';
|
||
comment on column BD_ORG_CLASS.code_url
|
||
is '家长录入链接';
|
||
comment on column BD_ORG_CLASS.code_pic
|
||
is '二维码图片';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_ORG_CLASS
|
||
add constraint PK_CLASS primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_ORG_GRADE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
grade_type VARCHAR2(1),
|
||
grade_name VARCHAR2(100),
|
||
grade_status VARCHAR2(32),
|
||
graduatingclassflag VARCHAR2(1),
|
||
grade_manager VARCHAR2(32),
|
||
assistantgrademanager VARCHAR2(32),
|
||
remark VARCHAR2(1000),
|
||
classnumber VARCHAR2(32),
|
||
school_id VARCHAR2(32),
|
||
create_by VARCHAR2(32),
|
||
create_date VARCHAR2(32),
|
||
update_by VARCHAR2(32),
|
||
update_date VARCHAR2(32),
|
||
delflag CHAR(1),
|
||
sortnumber VARCHAR2(32),
|
||
whethermanual CHAR(1)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 192K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_ORG_GRADE
|
||
is '年级表';
|
||
-- Add comments to the columns
|
||
comment on column BD_ORG_GRADE.grade_type
|
||
is '年级类型1-小学
|
||
2-初中 3-高中';
|
||
comment on column BD_ORG_GRADE.grade_name
|
||
is '年级名称';
|
||
comment on column BD_ORG_GRADE.grade_status
|
||
is '由所属学校学制决定
|
||
如:学校学制为6,则该字段取值为1-6
|
||
且一个学校一个年级类型下该值不能重复';
|
||
comment on column BD_ORG_GRADE.graduatingclassflag
|
||
is '是否毕业年级 0否1是';
|
||
comment on column BD_ORG_GRADE.grade_manager
|
||
is '年级主任';
|
||
comment on column BD_ORG_GRADE.assistantgrademanager
|
||
is '年级副主任';
|
||
comment on column BD_ORG_GRADE.remark
|
||
is '备注';
|
||
comment on column BD_ORG_GRADE.classnumber
|
||
is '班级数目';
|
||
comment on column BD_ORG_GRADE.school_id
|
||
is '所属学校';
|
||
comment on column BD_ORG_GRADE.create_by
|
||
is '创建人';
|
||
comment on column BD_ORG_GRADE.create_date
|
||
is '创建时间';
|
||
comment on column BD_ORG_GRADE.update_by
|
||
is '修改人';
|
||
comment on column BD_ORG_GRADE.update_date
|
||
is '修改时间';
|
||
comment on column BD_ORG_GRADE.delflag
|
||
is '是否删除;0:正常;1:删除;';
|
||
comment on column BD_ORG_GRADE.sortnumber
|
||
is '排序';
|
||
comment on column BD_ORG_GRADE.whethermanual
|
||
is '是否手动升级;0:系统自动升级;1:手动升级;';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_ORG_GRADE
|
||
add constraint PK_STB_SR_ORG_GRADE primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_REGISTER
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
user_id VARCHAR2(32),
|
||
register_time DATE,
|
||
register_status VARCHAR2(200),
|
||
register_class VARCHAR2(32),
|
||
old_class VARCHAR2(32),
|
||
review_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 18M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_REGISTER
|
||
is '注册信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_REGISTER.id
|
||
is '主键';
|
||
comment on column BD_REGISTER.user_id
|
||
is '用户id';
|
||
comment on column BD_REGISTER.register_time
|
||
is '注册时间';
|
||
comment on column BD_REGISTER.register_status
|
||
is '注册状态 0=未审核 1=审核通过 2=审核不通过 3=已删除';
|
||
comment on column BD_REGISTER.register_class
|
||
is '注册班级';
|
||
comment on column BD_REGISTER.old_class
|
||
is '原班级';
|
||
comment on column BD_REGISTER.review_time
|
||
is '审核时间';
|
||
-- Create/Recreate indexes
|
||
create unique index INDEX_USER_STATUS on BD_REGISTER (USER_ID, REGISTER_STATUS, REGISTER_CLASS)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index REG_CLASS_ID_INDEX on BD_REGISTER (REGISTER_CLASS)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index REG_TIME_INDEX on BD_REGISTER (REGISTER_TIME)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index REG_USERID_INDEX on BD_REGISTER (USER_ID)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_REGISTER
|
||
add constraint PK_BD_REGISTER primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 4M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
|
||
-- Create table
|
||
create table BD_REWARD
|
||
(
|
||
id NUMBER not null,
|
||
student_id NUMBER,
|
||
reward_name VARCHAR2(60),
|
||
reward_status VARCHAR2(10),
|
||
reward_level VARCHAR2(10),
|
||
reward_type VARCHAR2(10),
|
||
reward_time DATE,
|
||
reward_reason VARCHAR2(100),
|
||
reward_money NUMBER,
|
||
reward_semester VARCHAR2(10),
|
||
reward_unit VARCHAR2(100),
|
||
reward_types VARCHAR2(10),
|
||
reward_way VARCHAR2(10),
|
||
document_number VARCHAR2(24)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255;
|
||
-- Add comments to the table
|
||
comment on table BD_REWARD
|
||
is '学生奖励表';
|
||
-- Add comments to the columns
|
||
comment on column BD_REWARD.id
|
||
is '编号';
|
||
comment on column BD_REWARD.student_id
|
||
is '学生编号';
|
||
comment on column BD_REWARD.reward_name
|
||
is '奖励名称';
|
||
comment on column BD_REWARD.reward_status
|
||
is '奖励级别码';
|
||
comment on column BD_REWARD.reward_level
|
||
is '奖励等级码';
|
||
comment on column BD_REWARD.reward_type
|
||
is '获奖类别码';
|
||
comment on column BD_REWARD.reward_time
|
||
is '奖励时间';
|
||
comment on column BD_REWARD.reward_reason
|
||
is '奖励原因';
|
||
comment on column BD_REWARD.reward_money
|
||
is '奖励金额';
|
||
comment on column BD_REWARD.reward_semester
|
||
is '奖励学期';
|
||
comment on column BD_REWARD.reward_unit
|
||
is '颁奖单位';
|
||
comment on column BD_REWARD.reward_types
|
||
is '奖励类型码';
|
||
comment on column BD_REWARD.reward_way
|
||
is '奖励方式码';
|
||
comment on column BD_REWARD.document_number
|
||
is '奖励文号';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_REWARD
|
||
add constraint PK_BD_REWARD primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255;
|
||
|
||
-- Create table
|
||
create table BD_SCHOOL_INFO
|
||
(
|
||
school_id VARCHAR2(32) not null,
|
||
school_name VARCHAR2(100),
|
||
region_code VARCHAR2(32),
|
||
create_time VARCHAR2(32),
|
||
create_user VARCHAR2(32),
|
||
school_type VARCHAR2(32),
|
||
grade_number VARCHAR2(32),
|
||
address VARCHAR2(100),
|
||
conn_mobile VARCHAR2(20),
|
||
schoolmaster VARCHAR2(50),
|
||
update_date VARCHAR2(32),
|
||
update_user VARCHAR2(32),
|
||
school_code CHAR(4),
|
||
del_flag CHAR(1),
|
||
recyle_flag CHAR(1),
|
||
school_sys VARCHAR2(20),
|
||
school_en_name VARCHAR2(50),
|
||
postal_code VARCHAR2(6),
|
||
school_year VARCHAR2(32),
|
||
celebration_day VARCHAR2(32),
|
||
school_admin_code VARCHAR2(20),
|
||
legal_per_no VARCHAR2(10),
|
||
lefal_per_cer_no VARCHAR2(10),
|
||
principal_job_no VARCHAR2(10),
|
||
party_cmte_leader VARCHAR2(10),
|
||
org_code VARCHAR2(20),
|
||
fax_no VARCHAR2(20),
|
||
email VARCHAR2(30),
|
||
his_evol VARCHAR2(2000),
|
||
school_bbcode VARCHAR2(10),
|
||
org_owner_code VARCHAR2(10),
|
||
uar_type_code VARCHAR2(10),
|
||
eco_attr_code VARCHAR2(10),
|
||
family_attr VARCHAR2(10),
|
||
mt_lang_code VARCHAR2(10),
|
||
at_lang_code VARCHAR2(10),
|
||
enro_radius VARCHAR2(20),
|
||
home_address VARCHAR2(50),
|
||
school_administration VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 192K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SCHOOL_INFO
|
||
is '学校基础信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_SCHOOL_INFO.school_id
|
||
is '学校编号(主键,关联stb_customer usercode)';
|
||
comment on column BD_SCHOOL_INFO.school_name
|
||
is '学校名称';
|
||
comment on column BD_SCHOOL_INFO.region_code
|
||
is '所属区域ID(关联区划id)';
|
||
comment on column BD_SCHOOL_INFO.create_time
|
||
is '创建时间';
|
||
comment on column BD_SCHOOL_INFO.create_user
|
||
is '创建人';
|
||
comment on column BD_SCHOOL_INFO.school_type
|
||
is '学校类型:小学初中高中特殊学校九年制学校';
|
||
comment on column BD_SCHOOL_INFO.grade_number
|
||
is '包含年级数';
|
||
comment on column BD_SCHOOL_INFO.address
|
||
is '地址';
|
||
comment on column BD_SCHOOL_INFO.conn_mobile
|
||
is '联系电话';
|
||
comment on column BD_SCHOOL_INFO.schoolmaster
|
||
is '校长';
|
||
comment on column BD_SCHOOL_INFO.update_date
|
||
is '修改日期';
|
||
comment on column BD_SCHOOL_INFO.update_user
|
||
is '修改人';
|
||
comment on column BD_SCHOOL_INFO.school_code
|
||
is '学校编码';
|
||
comment on column BD_SCHOOL_INFO.del_flag
|
||
is '0正常,1删除';
|
||
comment on column BD_SCHOOL_INFO.recyle_flag
|
||
is '1,已回收,其他未回收';
|
||
comment on column BD_SCHOOL_INFO.school_sys
|
||
is '学制:125中专126小学127九年一贯制128特殊教育129完全中学130中学';
|
||
comment on column BD_SCHOOL_INFO.school_en_name
|
||
is '学校英文名称';
|
||
comment on column BD_SCHOOL_INFO.postal_code
|
||
is '学校邮政编码';
|
||
comment on column BD_SCHOOL_INFO.school_year
|
||
is '学校建校年月';
|
||
comment on column BD_SCHOOL_INFO.celebration_day
|
||
is '校庆日';
|
||
comment on column BD_SCHOOL_INFO.school_admin_code
|
||
is '学校主管部门码';
|
||
comment on column BD_SCHOOL_INFO.legal_per_no
|
||
is '法定代表人号';
|
||
comment on column BD_SCHOOL_INFO.lefal_per_cer_no
|
||
is '法人证书号';
|
||
comment on column BD_SCHOOL_INFO.principal_job_no
|
||
is '校长工号';
|
||
comment on column BD_SCHOOL_INFO.party_cmte_leader
|
||
is '党委负责人号';
|
||
comment on column BD_SCHOOL_INFO.org_code
|
||
is '组织机构码';
|
||
comment on column BD_SCHOOL_INFO.fax_no
|
||
is '传真电话';
|
||
comment on column BD_SCHOOL_INFO.email
|
||
is '电子信箱';
|
||
comment on column BD_SCHOOL_INFO.his_evol
|
||
is '历史沿革';
|
||
comment on column BD_SCHOOL_INFO.school_bbcode
|
||
is '学校办别码';
|
||
comment on column BD_SCHOOL_INFO.org_owner_code
|
||
is '所属主管单位码';
|
||
comment on column BD_SCHOOL_INFO.uar_type_code
|
||
is '所在地城乡类型码';
|
||
comment on column BD_SCHOOL_INFO.eco_attr_code
|
||
is '所在地经济属性码';
|
||
comment on column BD_SCHOOL_INFO.family_attr
|
||
is '所在地民族属性';
|
||
comment on column BD_SCHOOL_INFO.mt_lang_code
|
||
is '主教学语言码';
|
||
comment on column BD_SCHOOL_INFO.at_lang_code
|
||
is '辅教学语言码';
|
||
comment on column BD_SCHOOL_INFO.enro_radius
|
||
is '招生半径';
|
||
comment on column BD_SCHOOL_INFO.home_address
|
||
is '学校主页';
|
||
comment on column BD_SCHOOL_INFO.school_administration
|
||
is '学校区域代码';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SCHOOL_INFO
|
||
add constraint BD_SCHOOL_INFO primary key (SCHOOL_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SCHOOL_SYSTEM
|
||
(
|
||
id NUMBER not null,
|
||
name VARCHAR2(50),
|
||
min_age NUMBER,
|
||
max_age NUMBER,
|
||
create_user NUMBER,
|
||
create_date DATE,
|
||
update_user NUMBER,
|
||
update_date DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SCHOOL_SYSTEM
|
||
is '学制管理';
|
||
-- Add comments to the columns
|
||
comment on column BD_SCHOOL_SYSTEM.id
|
||
is 'id';
|
||
comment on column BD_SCHOOL_SYSTEM.name
|
||
is '学制名称';
|
||
comment on column BD_SCHOOL_SYSTEM.min_age
|
||
is '最小年龄';
|
||
comment on column BD_SCHOOL_SYSTEM.max_age
|
||
is '最大年龄';
|
||
comment on column BD_SCHOOL_SYSTEM.create_user
|
||
is '创建人';
|
||
comment on column BD_SCHOOL_SYSTEM.create_date
|
||
is '创建日期';
|
||
comment on column BD_SCHOOL_SYSTEM.update_user
|
||
is '修改人';
|
||
comment on column BD_SCHOOL_SYSTEM.update_date
|
||
is '修改日期';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SCHOOL_SYSTEM
|
||
add constraint SCHOOL_SYSTEM_KEY primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SCHOOL_TERM
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
term_name VARCHAR2(50),
|
||
school_year_id VARCHAR2(32),
|
||
term_start_date DATE,
|
||
term_end_date DATE,
|
||
single_or_double_weeks CHAR(1),
|
||
current_term CHAR(1),
|
||
class_days NUMBER,
|
||
create_user VARCHAR2(32),
|
||
create_date DATE,
|
||
update_user VARCHAR2(32),
|
||
update_date DATE,
|
||
remarks VARCHAR2(100)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SCHOOL_TERM
|
||
is '学期管理';
|
||
-- Add comments to the columns
|
||
comment on column BD_SCHOOL_TERM.id
|
||
is 'id';
|
||
comment on column BD_SCHOOL_TERM.term_name
|
||
is '学期名称';
|
||
comment on column BD_SCHOOL_TERM.school_year_id
|
||
is '学年编号';
|
||
comment on column BD_SCHOOL_TERM.term_start_date
|
||
is '学期开学时间';
|
||
comment on column BD_SCHOOL_TERM.term_end_date
|
||
is '学期结束时间';
|
||
comment on column BD_SCHOOL_TERM.single_or_double_weeks
|
||
is '是否为单双周(1,单周,2双周)';
|
||
comment on column BD_SCHOOL_TERM.current_term
|
||
is '是否为当前学期,1:当前学期,0,不是当前学期';
|
||
comment on column BD_SCHOOL_TERM.class_days
|
||
is '上课天数';
|
||
comment on column BD_SCHOOL_TERM.create_user
|
||
is '创建人';
|
||
comment on column BD_SCHOOL_TERM.create_date
|
||
is '创建日期';
|
||
comment on column BD_SCHOOL_TERM.update_user
|
||
is '修改人';
|
||
comment on column BD_SCHOOL_TERM.update_date
|
||
is '修改日期';
|
||
comment on column BD_SCHOOL_TERM.remarks
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SCHOOL_TERM
|
||
add constraint BD_SCHOOL_TERM_KEY primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SCHOOL_YEAR
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
year_name VARCHAR2(100),
|
||
start_date DATE,
|
||
end_date DATE,
|
||
create_user VARCHAR2(32),
|
||
create_date DATE,
|
||
update_user VARCHAR2(32),
|
||
update_date DATE,
|
||
del_flag CHAR(1),
|
||
remarks VARCHAR2(100)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SCHOOL_YEAR
|
||
is '学年管理';
|
||
-- Add comments to the columns
|
||
comment on column BD_SCHOOL_YEAR.id
|
||
is 'id';
|
||
comment on column BD_SCHOOL_YEAR.year_name
|
||
is '学年名称';
|
||
comment on column BD_SCHOOL_YEAR.start_date
|
||
is '开始日期';
|
||
comment on column BD_SCHOOL_YEAR.end_date
|
||
is '结束日期';
|
||
comment on column BD_SCHOOL_YEAR.create_user
|
||
is '创建人';
|
||
comment on column BD_SCHOOL_YEAR.create_date
|
||
is '创建时间';
|
||
comment on column BD_SCHOOL_YEAR.update_user
|
||
is '修改人';
|
||
comment on column BD_SCHOOL_YEAR.update_date
|
||
is '修改日期';
|
||
comment on column BD_SCHOOL_YEAR.del_flag
|
||
is '是否删除';
|
||
comment on column BD_SCHOOL_YEAR.remarks
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SCHOOL_YEAR
|
||
add constraint BD_SCHOOL_YEAR_KEY primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SIGN_IN
|
||
(
|
||
id VARCHAR2(32),
|
||
site_id VARCHAR2(32),
|
||
ecard_number VARCHAR2(32),
|
||
card_uid VARCHAR2(32),
|
||
sign_time DATE,
|
||
id_card VARCHAR2(32),
|
||
create_time DATE,
|
||
note VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 256K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SIGN_IN
|
||
is '社会实践学生签到表';
|
||
-- Add comments to the columns
|
||
comment on column BD_SIGN_IN.site_id
|
||
is '对应BD_SITE.SITE_ID';
|
||
comment on column BD_SIGN_IN.ecard_number
|
||
is 'E卡通号码';
|
||
comment on column BD_SIGN_IN.card_uid
|
||
is '卡片序列号';
|
||
comment on column BD_SIGN_IN.sign_time
|
||
is '签到时间';
|
||
comment on column BD_SIGN_IN.id_card
|
||
is '身份证号码';
|
||
comment on column BD_SIGN_IN.create_time
|
||
is '数据创建时间';
|
||
comment on column BD_SIGN_IN.note
|
||
is '记录app传过来的note信息';
|
||
-- Create table
|
||
create table BD_SITE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
site_id VARCHAR2(32),
|
||
site_name VARCHAR2(500),
|
||
last_update_time DATE,
|
||
status VARCHAR2(32),
|
||
create_time DATE,
|
||
update_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SITE
|
||
is '社会实践地点信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_SITE.id
|
||
is 'id';
|
||
comment on column BD_SITE.site_id
|
||
is '编号';
|
||
comment on column BD_SITE.site_name
|
||
is '名称';
|
||
comment on column BD_SITE.last_update_time
|
||
is '最后更新时间';
|
||
comment on column BD_SITE.status
|
||
is '状态';
|
||
comment on column BD_SITE.create_time
|
||
is '创建时间';
|
||
comment on column BD_SITE.update_time
|
||
is '更新时间';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SITE
|
||
add constraint PK_BD_SITE primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SR_FLOW_RETIRE
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
retire_code VARCHAR2(32),
|
||
title VARCHAR2(200),
|
||
create_user VARCHAR2(32),
|
||
create_time DATE,
|
||
status VARCHAR2(20) default 0
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SR_FLOW_RETIRE
|
||
is '退休人员信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_SR_FLOW_RETIRE.id
|
||
is '退休编号(主键)';
|
||
comment on column BD_SR_FLOW_RETIRE.retire_code
|
||
is '退休人名称';
|
||
comment on column BD_SR_FLOW_RETIRE.title
|
||
is '备注';
|
||
comment on column BD_SR_FLOW_RETIRE.create_user
|
||
is '创建人';
|
||
comment on column BD_SR_FLOW_RETIRE.create_time
|
||
is '创建时间';
|
||
comment on column BD_SR_FLOW_RETIRE.status
|
||
is '审核状态:0未审核 1学校审核通过2区审核通过3市审核通过 4审核不通过间';
|
||
-- Create table
|
||
create table BD_SR_ORG_DEPT
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
dept_id VARCHAR2(150),
|
||
dept_name VARCHAR2(150),
|
||
ads_id VARCHAR2(150)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SR_ORG_DEPT
|
||
is '学校部门信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_SR_ORG_DEPT.id
|
||
is '部门编号(主键)';
|
||
comment on column BD_SR_ORG_DEPT.dept_id
|
||
is '上级机构ID';
|
||
comment on column BD_SR_ORG_DEPT.dept_name
|
||
is '机构名称';
|
||
comment on column BD_SR_ORG_DEPT.ads_id
|
||
is '管理员';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SR_ORG_DEPT
|
||
add constraint BD_SR_ORG_DEPT primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_STUDENT
|
||
(
|
||
student_id VARCHAR2(32) not null,
|
||
student_no VARCHAR2(50),
|
||
name VARCHAR2(100),
|
||
english_name VARCHAR2(20),
|
||
name_py VARCHAR2(20),
|
||
last_name VARCHAR2(20),
|
||
gender VARCHAR2(10),
|
||
birth_date VARCHAR2(32),
|
||
birth_place VARCHAR2(200),
|
||
jg VARCHAR2(100),
|
||
mzm VARCHAR2(10),
|
||
gjdqm VARCHAR2(10),
|
||
id_card_type VARCHAR2(10),
|
||
marr_state_no VARCHAR2(10),
|
||
agtqwm VARCHAR2(10),
|
||
political_face_code VARCHAR2(10),
|
||
health_status_code VARCHAR2(10),
|
||
religious_belief_code VARCHAR2(10),
|
||
blood_type VARCHAR2(10),
|
||
picture_one VARCHAR2(200),
|
||
id_period VARCHAR2(30),
|
||
only_child_flag VARCHAR2(1),
|
||
admission_date VARCHAR2(30),
|
||
student_type_code VARCHAR2(10),
|
||
now_address VARCHAR2(500),
|
||
acc_location VARCHAR2(500),
|
||
acc_nature_code VARCHAR2(10),
|
||
floating_person VARCHAR2(1),
|
||
conn_phone VARCHAR2(50),
|
||
conn_address VARCHAR2(500),
|
||
postal_code VARCHAR2(6),
|
||
email_address VARCHAR2(30),
|
||
homepage_address VARCHAR2(200),
|
||
pro_level_stu_no VARCHAR2(30),
|
||
status VARCHAR2(1),
|
||
study_nature VARCHAR2(1),
|
||
admission_stype VARCHAR2(10),
|
||
is_stay VARCHAR2(1),
|
||
stay_info VARCHAR2(200),
|
||
shengxiao VARCHAR2(2),
|
||
political_come_time VARCHAR2(32),
|
||
student_status VARCHAR2(2),
|
||
ss VARCHAR2(50),
|
||
student_passport VARCHAR2(100),
|
||
class_id VARCHAR2(32),
|
||
id_card VARCHAR2(64),
|
||
check_date VARCHAR2(32),
|
||
check_status VARCHAR2(2),
|
||
check_user VARCHAR2(32),
|
||
modify_date VARCHAR2(32),
|
||
modify_user VARCHAR2(32),
|
||
create_by VARCHAR2(32),
|
||
create_date VARCHAR2(32),
|
||
delflag CHAR(1),
|
||
picture_one_image VARCHAR2(32),
|
||
addby_schoolfalg CHAR(1),
|
||
collection_method VARCHAR2(1) default 1 not null,
|
||
is_send_sms VARCHAR2(2) default 0,
|
||
school_stu_no VARCHAR2(50)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STUDENT
|
||
is '学生信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STUDENT.student_id
|
||
is '学生编号';
|
||
comment on column BD_STUDENT.student_no
|
||
is '学号';
|
||
comment on column BD_STUDENT.name
|
||
is '姓名';
|
||
comment on column BD_STUDENT.english_name
|
||
is '英文姓名';
|
||
comment on column BD_STUDENT.name_py
|
||
is '姓名拼音';
|
||
comment on column BD_STUDENT.last_name
|
||
is '曾用名';
|
||
comment on column BD_STUDENT.gender
|
||
is '性别码';
|
||
comment on column BD_STUDENT.birth_date
|
||
is '出生日期';
|
||
comment on column BD_STUDENT.birth_place
|
||
is '出生地码';
|
||
comment on column BD_STUDENT.jg
|
||
is '籍贯';
|
||
comment on column BD_STUDENT.mzm
|
||
is '民族码';
|
||
comment on column BD_STUDENT.gjdqm
|
||
is '国籍/地区码';
|
||
comment on column BD_STUDENT.id_card_type
|
||
is '身份证件类型码';
|
||
comment on column BD_STUDENT.marr_state_no
|
||
is '婚姻状况码';
|
||
comment on column BD_STUDENT.agtqwm
|
||
is '港澳台侨外码';
|
||
comment on column BD_STUDENT.political_face_code
|
||
is '政治面貌码';
|
||
comment on column BD_STUDENT.health_status_code
|
||
is '健康状况码';
|
||
comment on column BD_STUDENT.religious_belief_code
|
||
is '信仰宗教码';
|
||
comment on column BD_STUDENT.blood_type
|
||
is '血型码';
|
||
comment on column BD_STUDENT.picture_one
|
||
is '照片';
|
||
comment on column BD_STUDENT.id_period
|
||
is '身份证件有效期';
|
||
comment on column BD_STUDENT.only_child_flag
|
||
is '独生子女标志';
|
||
comment on column BD_STUDENT.admission_date
|
||
is '入学年月';
|
||
comment on column BD_STUDENT.student_type_code
|
||
is '学生类别码';
|
||
comment on column BD_STUDENT.now_address
|
||
is '现住址';
|
||
comment on column BD_STUDENT.acc_location
|
||
is '户口所在地';
|
||
comment on column BD_STUDENT.acc_nature_code
|
||
is '户口性质码';
|
||
comment on column BD_STUDENT.floating_person
|
||
is '是否流动人口';
|
||
comment on column BD_STUDENT.conn_phone
|
||
is '联系电话';
|
||
comment on column BD_STUDENT.conn_address
|
||
is '通信地址';
|
||
comment on column BD_STUDENT.postal_code
|
||
is '邮政编码';
|
||
comment on column BD_STUDENT.email_address
|
||
is '电子信箱';
|
||
comment on column BD_STUDENT.homepage_address
|
||
is '主页地址';
|
||
comment on column BD_STUDENT.pro_level_stu_no
|
||
is '省学籍号';
|
||
comment on column BD_STUDENT.status
|
||
is '0正常1已毕业2已结业3其他离校状态中';
|
||
comment on column BD_STUDENT.study_nature
|
||
is '就读性质';
|
||
comment on column BD_STUDENT.admission_stype
|
||
is '入学方式:1普通入学
|
||
2民族班
|
||
3体育特招
|
||
4外校转入
|
||
5恢复入学资格
|
||
9其他';
|
||
comment on column BD_STUDENT.is_stay
|
||
is '是否住宿';
|
||
comment on column BD_STUDENT.stay_info
|
||
is '住宿信息';
|
||
comment on column BD_STUDENT.shengxiao
|
||
is '生肖';
|
||
comment on column BD_STUDENT.political_come_time
|
||
is '政治加入时间';
|
||
comment on column BD_STUDENT.student_status
|
||
is '学籍状态';
|
||
comment on column BD_STUDENT.student_passport
|
||
is '学生护照号';
|
||
comment on column BD_STUDENT.class_id
|
||
is '所属班级:STB_SR_ORG_CLASS表id';
|
||
comment on column BD_STUDENT.id_card
|
||
is '身份证号';
|
||
comment on column BD_STUDENT.check_date
|
||
is '审核日期';
|
||
comment on column BD_STUDENT.check_status
|
||
is '审核状态(0学生信息录入1班主任审核通过2班主任审核不通过3学校审核通过4学校审核不通过5区账号审核通过6区账号审核不通过)';
|
||
comment on column BD_STUDENT.check_user
|
||
is '审核人sys_user表id';
|
||
comment on column BD_STUDENT.modify_date
|
||
is '修改日期';
|
||
comment on column BD_STUDENT.modify_user
|
||
is '修改人sys_user表id';
|
||
comment on column BD_STUDENT.create_by
|
||
is '创建人';
|
||
comment on column BD_STUDENT.create_date
|
||
is '创建时间';
|
||
comment on column BD_STUDENT.delflag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
comment on column BD_STUDENT.addby_schoolfalg
|
||
is '学校管理员新增学生标志位 1为学校管理员新增';
|
||
comment on column BD_STUDENT.collection_method
|
||
is '采集方式,1为pc端采集、2为移动端采集';
|
||
comment on column BD_STUDENT.is_send_sms
|
||
is '是否发过短信 0否1是';
|
||
comment on column BD_STUDENT.school_stu_no
|
||
is '校内学生编号(默认E卡通号码)';
|
||
-- Create/Recreate indexes
|
||
create index BD_STUDENT_IDCARD on BD_STUDENT (ID_CARD)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_TEMP_CLASS_ID on BD_STUDENT (CLASS_ID)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create unique index PK_IDCARD_PASSPORT_DELFLAG on BD_STUDENT (ID_CARD, STUDENT_PASSPORT, DELFLAG)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_STUDENT
|
||
add constraint PK_BD_STUDENT primary key (STUDENT_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 23M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_STUDENT_EDITS
|
||
(
|
||
student_id NUMBER,
|
||
student_no VARCHAR2(20),
|
||
name VARCHAR2(30),
|
||
gender VARCHAR2(10),
|
||
picture_one VARCHAR2(200),
|
||
now_address VARCHAR2(200),
|
||
student_passport VARCHAR2(50),
|
||
class_id NUMBER,
|
||
id_card VARCHAR2(64),
|
||
create_by NUMBER,
|
||
create_date DATE,
|
||
delflag CHAR(1),
|
||
ecard_number VARCHAR2(12),
|
||
check_user NUMBER,
|
||
check_data DATE,
|
||
check_status CHAR(1),
|
||
check_remarks VARCHAR2(200),
|
||
pro_level_stu_no VARCHAR2(30),
|
||
id NUMBER not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STUDENT_EDITS
|
||
is '学生修改信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STUDENT_EDITS.student_id
|
||
is '学生编号';
|
||
comment on column BD_STUDENT_EDITS.student_no
|
||
is '学号';
|
||
comment on column BD_STUDENT_EDITS.name
|
||
is '姓名';
|
||
comment on column BD_STUDENT_EDITS.gender
|
||
is '性别码';
|
||
comment on column BD_STUDENT_EDITS.picture_one
|
||
is '照片';
|
||
comment on column BD_STUDENT_EDITS.now_address
|
||
is '现住址';
|
||
comment on column BD_STUDENT_EDITS.student_passport
|
||
is '学生护照号';
|
||
comment on column BD_STUDENT_EDITS.class_id
|
||
is '所属班级:STB_SR_ORG_CLASS表id';
|
||
comment on column BD_STUDENT_EDITS.id_card
|
||
is '身份证号';
|
||
comment on column BD_STUDENT_EDITS.create_by
|
||
is '创建人';
|
||
comment on column BD_STUDENT_EDITS.create_date
|
||
is '创建日期';
|
||
comment on column BD_STUDENT_EDITS.delflag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
comment on column BD_STUDENT_EDITS.ecard_number
|
||
is 'E通卡卡号';
|
||
comment on column BD_STUDENT_EDITS.check_user
|
||
is '审核人';
|
||
comment on column BD_STUDENT_EDITS.check_data
|
||
is '审核时间';
|
||
comment on column BD_STUDENT_EDITS.check_status
|
||
is '审核状态';
|
||
comment on column BD_STUDENT_EDITS.check_remarks
|
||
is '审核备注';
|
||
comment on column BD_STUDENT_EDITS.pro_level_stu_no
|
||
is '省学籍号';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_STUDENT_EDITS
|
||
add constraint PK_BD_STUDENT_EDITS primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_STUDENT_PARENT
|
||
(
|
||
studentusercode VARCHAR2(80),
|
||
parentusercode VARCHAR2(80),
|
||
relation NUMBER,
|
||
status NUMBER,
|
||
cortime DATE,
|
||
isbank NUMBER,
|
||
studentguid VARCHAR2(80),
|
||
parentguid VARCHAR2(80),
|
||
bankcard VARCHAR2(100),
|
||
bandtime DATE,
|
||
bankid NUMBER
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 49M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STUDENT_PARENT
|
||
is '学生家长关系表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STUDENT_PARENT.studentusercode
|
||
is '学生E卡通号码';
|
||
comment on column BD_STUDENT_PARENT.parentusercode
|
||
is '父母表ID';
|
||
comment on column BD_STUDENT_PARENT.relation
|
||
is '关系';
|
||
comment on column BD_STUDENT_PARENT.status
|
||
is '0已制卡1未制卡2余额不足3无效4更新5银行处理中6制卡失败';
|
||
comment on column BD_STUDENT_PARENT.cortime
|
||
is '操作时间';
|
||
comment on column BD_STUDENT_PARENT.bankcard
|
||
is '银行卡号';
|
||
-- Create/Recreate indexes
|
||
create index USERCODE_INDEX on BD_STUDENT_PARENT (STUDENTUSERCODE)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_STUDENT_RAISE_HANDS
|
||
(
|
||
id NUMBER not null,
|
||
school_id VARCHAR2(32),
|
||
user_id VARCHAR2(32),
|
||
student_num NUMBER,
|
||
raise_hands_time DATE,
|
||
start_time DATE,
|
||
end_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STUDENT_RAISE_HANDS
|
||
is '上报完成举手表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STUDENT_RAISE_HANDS.school_id
|
||
is '学校id';
|
||
comment on column BD_STUDENT_RAISE_HANDS.user_id
|
||
is '举手人(sys_user表id)';
|
||
comment on column BD_STUDENT_RAISE_HANDS.student_num
|
||
is '学生数量';
|
||
comment on column BD_STUDENT_RAISE_HANDS.raise_hands_time
|
||
is '举手时间';
|
||
comment on column BD_STUDENT_RAISE_HANDS.start_time
|
||
is '筛选开始时间';
|
||
comment on column BD_STUDENT_RAISE_HANDS.end_time
|
||
is '筛选结束时间';
|
||
-- Create table
|
||
create table BD_STUDENT_REAL
|
||
(
|
||
student_id VARCHAR2(32) not null,
|
||
student_no VARCHAR2(50),
|
||
name VARCHAR2(100),
|
||
english_name VARCHAR2(20),
|
||
name_py VARCHAR2(20),
|
||
last_name VARCHAR2(20),
|
||
gender VARCHAR2(10),
|
||
birth_date VARCHAR2(32),
|
||
birth_place VARCHAR2(200),
|
||
jg VARCHAR2(100),
|
||
mzm VARCHAR2(10),
|
||
gjdqm VARCHAR2(10),
|
||
id_card_type VARCHAR2(10),
|
||
marr_state_no VARCHAR2(10),
|
||
agtqwm VARCHAR2(10),
|
||
political_face_code VARCHAR2(10),
|
||
health_status_code VARCHAR2(10),
|
||
religious_belief_code VARCHAR2(10),
|
||
blood_type VARCHAR2(10),
|
||
picture_one VARCHAR2(200),
|
||
id_period VARCHAR2(30),
|
||
only_child_flag VARCHAR2(1),
|
||
admission_date VARCHAR2(30),
|
||
student_type_code VARCHAR2(10),
|
||
now_address VARCHAR2(500),
|
||
acc_location VARCHAR2(500),
|
||
acc_nature_code VARCHAR2(10),
|
||
floating_person VARCHAR2(1),
|
||
conn_phone VARCHAR2(50),
|
||
conn_address VARCHAR2(500),
|
||
postal_code VARCHAR2(6),
|
||
email_address VARCHAR2(30),
|
||
homepage_address VARCHAR2(200),
|
||
pro_level_stu_no VARCHAR2(30),
|
||
status VARCHAR2(1),
|
||
study_nature VARCHAR2(1),
|
||
admission_stype VARCHAR2(10),
|
||
is_stay VARCHAR2(1),
|
||
stay_info VARCHAR2(200),
|
||
shengxiao VARCHAR2(2),
|
||
political_come_time VARCHAR2(32),
|
||
student_status VARCHAR2(2),
|
||
ss VARCHAR2(50),
|
||
student_passport VARCHAR2(100),
|
||
class_id VARCHAR2(32),
|
||
id_card VARCHAR2(64),
|
||
modify_date VARCHAR2(32),
|
||
modify_user VARCHAR2(32),
|
||
create_by VARCHAR2(32),
|
||
create_date VARCHAR2(32) default SYSDATE,
|
||
delflag CHAR(1),
|
||
ecard_number VARCHAR2(20),
|
||
recover_flag CHAR(1),
|
||
confirm_status CHAR(1),
|
||
confirm_date DATE,
|
||
confirm_by VARCHAR2(20),
|
||
picture_one_image VARCHAR2(32),
|
||
card_type VARCHAR2(2) default 2 not null,
|
||
before_card_type VARCHAR2(2),
|
||
graduation_batch_no VARCHAR2(32),
|
||
collection_method VARCHAR2(1) default 1 not null,
|
||
school_stu_no VARCHAR2(50)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STUDENT_REAL
|
||
is '学生信息正式表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STUDENT_REAL.student_id
|
||
is '学生编号';
|
||
comment on column BD_STUDENT_REAL.student_no
|
||
is '学号';
|
||
comment on column BD_STUDENT_REAL.name
|
||
is '姓名';
|
||
comment on column BD_STUDENT_REAL.english_name
|
||
is '英文姓名';
|
||
comment on column BD_STUDENT_REAL.name_py
|
||
is '姓名拼音';
|
||
comment on column BD_STUDENT_REAL.last_name
|
||
is '曾用名';
|
||
comment on column BD_STUDENT_REAL.gender
|
||
is '性别码';
|
||
comment on column BD_STUDENT_REAL.birth_date
|
||
is '出生日期';
|
||
comment on column BD_STUDENT_REAL.birth_place
|
||
is '出生地码';
|
||
comment on column BD_STUDENT_REAL.jg
|
||
is '籍贯';
|
||
comment on column BD_STUDENT_REAL.mzm
|
||
is '民族码';
|
||
comment on column BD_STUDENT_REAL.gjdqm
|
||
is '国籍/地区码';
|
||
comment on column BD_STUDENT_REAL.id_card_type
|
||
is '身份证件类型码';
|
||
comment on column BD_STUDENT_REAL.marr_state_no
|
||
is '婚姻状况码';
|
||
comment on column BD_STUDENT_REAL.agtqwm
|
||
is '港澳台侨外码';
|
||
comment on column BD_STUDENT_REAL.political_face_code
|
||
is '政治面貌码';
|
||
comment on column BD_STUDENT_REAL.health_status_code
|
||
is '健康状况码';
|
||
comment on column BD_STUDENT_REAL.religious_belief_code
|
||
is '信仰宗教码';
|
||
comment on column BD_STUDENT_REAL.blood_type
|
||
is '血型码';
|
||
comment on column BD_STUDENT_REAL.picture_one
|
||
is '照片';
|
||
comment on column BD_STUDENT_REAL.id_period
|
||
is '身份证件有效期';
|
||
comment on column BD_STUDENT_REAL.only_child_flag
|
||
is '独生子女标志';
|
||
comment on column BD_STUDENT_REAL.admission_date
|
||
is '入学年月';
|
||
comment on column BD_STUDENT_REAL.student_type_code
|
||
is '学生类别码';
|
||
comment on column BD_STUDENT_REAL.now_address
|
||
is '现住址';
|
||
comment on column BD_STUDENT_REAL.acc_location
|
||
is '户口所在地';
|
||
comment on column BD_STUDENT_REAL.acc_nature_code
|
||
is '户口性质码';
|
||
comment on column BD_STUDENT_REAL.floating_person
|
||
is '是否流动人口';
|
||
comment on column BD_STUDENT_REAL.conn_phone
|
||
is '联系电话';
|
||
comment on column BD_STUDENT_REAL.conn_address
|
||
is '通信地址';
|
||
comment on column BD_STUDENT_REAL.postal_code
|
||
is '邮政编码';
|
||
comment on column BD_STUDENT_REAL.email_address
|
||
is '电子信箱';
|
||
comment on column BD_STUDENT_REAL.homepage_address
|
||
is '主页地址';
|
||
comment on column BD_STUDENT_REAL.pro_level_stu_no
|
||
is '省学籍号';
|
||
comment on column BD_STUDENT_REAL.status
|
||
is '0正常1已毕业2已结业3其他离校状态中';
|
||
comment on column BD_STUDENT_REAL.study_nature
|
||
is '就读性质';
|
||
comment on column BD_STUDENT_REAL.admission_stype
|
||
is '入学方式:1普通入学
|
||
2民族班
|
||
3体育特招
|
||
4外校转入
|
||
5恢复入学资格
|
||
9其他';
|
||
comment on column BD_STUDENT_REAL.is_stay
|
||
is '是否住宿';
|
||
comment on column BD_STUDENT_REAL.stay_info
|
||
is '住宿信息';
|
||
comment on column BD_STUDENT_REAL.shengxiao
|
||
is '生肖';
|
||
comment on column BD_STUDENT_REAL.political_come_time
|
||
is '政治加入时间';
|
||
comment on column BD_STUDENT_REAL.student_status
|
||
is '学籍状态';
|
||
comment on column BD_STUDENT_REAL.student_passport
|
||
is '学生护照号';
|
||
comment on column BD_STUDENT_REAL.class_id
|
||
is '所属班级:STB_SR_ORG_CLASS表id';
|
||
comment on column BD_STUDENT_REAL.id_card
|
||
is '身份证号';
|
||
comment on column BD_STUDENT_REAL.modify_date
|
||
is '修改日期';
|
||
comment on column BD_STUDENT_REAL.modify_user
|
||
is '修改人';
|
||
comment on column BD_STUDENT_REAL.create_by
|
||
is '创建人';
|
||
comment on column BD_STUDENT_REAL.create_date
|
||
is '创建日期';
|
||
comment on column BD_STUDENT_REAL.delflag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
comment on column BD_STUDENT_REAL.ecard_number
|
||
is 'E通卡卡号';
|
||
comment on column BD_STUDENT_REAL.recover_flag
|
||
is 'E通卡卡号回收标志位;0:未回收;1;已回收:';
|
||
comment on column BD_STUDENT_REAL.card_type
|
||
is '2未发卡 3已发卡 4已注销 5已毕业';
|
||
comment on column BD_STUDENT_REAL.graduation_batch_no
|
||
is '毕业批次号';
|
||
comment on column BD_STUDENT_REAL.collection_method
|
||
is '采集方式,1为pc端采集、2为移动端采集';
|
||
comment on column BD_STUDENT_REAL.school_stu_no
|
||
is '校内学生编号(默认E卡通号码)';
|
||
-- Create/Recreate indexes
|
||
create index INDEX_BD_STUDENT_CARDTYPE on BD_STUDENT_REAL (CARD_TYPE)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_BD_STUDENT_ID_CARD on BD_STUDENT_REAL (ID_CARD)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_CLASS_ID on BD_STUDENT_REAL (CLASS_ID)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_STUDENT_ECARD_NUMBER on BD_STUDENT_REAL (DELFLAG, ECARD_NUMBER)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_STUDENT_ID_CARD on BD_STUDENT_REAL (DELFLAG, ID_CARD)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_STUDENT_REAL
|
||
add constraint PK_BD_STUDENT_REAL1 primary key (STUDENT_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Grant/Revoke object privileges
|
||
grant select on BD_STUDENT_REAL to SZCARD;
|
||
-- Create table
|
||
create table BD_STU_CHANGE_SCHOOL
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
change_id VARCHAR2(10),
|
||
status NUMBER(2),
|
||
student_id VARCHAR2(32),
|
||
exchange_date DATE,
|
||
exchange_content VARCHAR2(300),
|
||
apply_time DATE,
|
||
apply_user VARCHAR2(32),
|
||
check_user VARCHAR2(32),
|
||
check_date DATE,
|
||
check_content VARCHAR2(300),
|
||
check_no VARCHAR2(24),
|
||
sour_sch_no VARCHAR2(30),
|
||
sour_class_no VARCHAR2(30),
|
||
sour_grade_no VARCHAR2(30),
|
||
now_sch_no VARCHAR2(30),
|
||
now_class_no VARCHAR2(30),
|
||
now_grade_no VARCHAR2(30),
|
||
mdf_user VARCHAR2(32),
|
||
mdf_date DATE,
|
||
del_flag CHAR(1)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 6M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_STU_CHANGE_SCHOOL
|
||
is '学生转学记录表';
|
||
-- Add comments to the columns
|
||
comment on column BD_STU_CHANGE_SCHOOL.id
|
||
is '编号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.change_id
|
||
is '异动编号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.status
|
||
is '0目标学校申请1目标区域管理员审核通过2目标区域管理员审核不通过';
|
||
comment on column BD_STU_CHANGE_SCHOOL.student_id
|
||
is '学生编号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.exchange_date
|
||
is '转学日期';
|
||
comment on column BD_STU_CHANGE_SCHOOL.exchange_content
|
||
is '转学说明';
|
||
comment on column BD_STU_CHANGE_SCHOOL.apply_time
|
||
is '申请时间';
|
||
comment on column BD_STU_CHANGE_SCHOOL.apply_user
|
||
is '申请人';
|
||
comment on column BD_STU_CHANGE_SCHOOL.check_user
|
||
is '审批人';
|
||
comment on column BD_STU_CHANGE_SCHOOL.check_date
|
||
is '审批日期';
|
||
comment on column BD_STU_CHANGE_SCHOOL.check_content
|
||
is '审批理由';
|
||
comment on column BD_STU_CHANGE_SCHOOL.check_no
|
||
is '审批文号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.sour_sch_no
|
||
is '原学校编号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.sour_class_no
|
||
is '原班号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.sour_grade_no
|
||
is '原年级';
|
||
comment on column BD_STU_CHANGE_SCHOOL.now_sch_no
|
||
is '现学校编号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.now_class_no
|
||
is '现班号';
|
||
comment on column BD_STU_CHANGE_SCHOOL.now_grade_no
|
||
is '现年级';
|
||
comment on column BD_STU_CHANGE_SCHOOL.mdf_user
|
||
is '修改人';
|
||
comment on column BD_STU_CHANGE_SCHOOL.mdf_date
|
||
is '修改日期';
|
||
comment on column BD_STU_CHANGE_SCHOOL.del_flag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_STU_CHANGE_SCHOOL
|
||
add constraint PK_BD_STU_CHANGE_SCHOOL primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 576K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_SUBJECT
|
||
(
|
||
id NUMBER not null,
|
||
subject_name VARCHAR2(50),
|
||
result_is CHAR(1),
|
||
is_join_exam CHAR(1),
|
||
is_valid CHAR(1),
|
||
school_type VARCHAR2(10),
|
||
create_user NUMBER,
|
||
create_date DATE,
|
||
update_user NUMBER,
|
||
update_date DATE,
|
||
remarks VARCHAR2(200)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_SUBJECT
|
||
is '科目管理';
|
||
-- Add comments to the columns
|
||
comment on column BD_SUBJECT.id
|
||
is 'id';
|
||
comment on column BD_SUBJECT.subject_name
|
||
is '科目名称';
|
||
comment on column BD_SUBJECT.result_is
|
||
is '成绩属于 1,分数;2,等级';
|
||
comment on column BD_SUBJECT.is_join_exam
|
||
is '是否参与考试,1是,0,否';
|
||
comment on column BD_SUBJECT.is_valid
|
||
is '是否有效,1有效,0无效';
|
||
comment on column BD_SUBJECT.school_type
|
||
is '学校类型(字典获取)';
|
||
comment on column BD_SUBJECT.create_user
|
||
is '创建人';
|
||
comment on column BD_SUBJECT.create_date
|
||
is '创建时间';
|
||
comment on column BD_SUBJECT.update_user
|
||
is '修改人';
|
||
comment on column BD_SUBJECT.update_date
|
||
is '修改日期';
|
||
comment on column BD_SUBJECT.remarks
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_SUBJECT
|
||
add constraint SCHOOL_SUBJECT primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_TEACHER_CHANGE_SCHOOL
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
status NUMBER(2),
|
||
teacher_id VARCHAR2(32),
|
||
change_time DATE,
|
||
change_content VARCHAR2(200),
|
||
apply_time DATE,
|
||
apply_user VARCHAR2(32),
|
||
check_date DATE,
|
||
check_content VARCHAR2(200),
|
||
check_no VARCHAR2(24),
|
||
sour_school_no VARCHAR2(30),
|
||
now_school_no VARCHAR2(30),
|
||
check_user VARCHAR2(32),
|
||
mdf_user VARCHAR2(32),
|
||
mdf_date DATE,
|
||
del_flag CHAR(1) default 0
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 256K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_TEACHER_CHANGE_SCHOOL
|
||
is '教师转学';
|
||
-- Add comments to the columns
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.id
|
||
is '编号';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.status
|
||
is '0目标学校申请1目标区域管理员审核通过2目标区域管理员审核不通过';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.teacher_id
|
||
is '教师编号';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.change_time
|
||
is '转学日期';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.change_content
|
||
is '转学说明';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.apply_time
|
||
is '申请时间';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.apply_user
|
||
is '申请人';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.check_date
|
||
is '审批日期';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.check_content
|
||
is '审批理由';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.check_no
|
||
is '审批文号';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.sour_school_no
|
||
is '原学校编号';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.now_school_no
|
||
is '现学校编号';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.check_user
|
||
is '审批人';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.mdf_user
|
||
is '修改人';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.mdf_date
|
||
is '修改日期';
|
||
comment on column BD_TEACHER_CHANGE_SCHOOL.del_flag
|
||
is '删除标志位:0:正常;1:删除;';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_TEACHER_CHANGE_SCHOOL
|
||
add constraint PK_BD_TEACHER_CHANGE_SCHOOL primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_TEACHER_INFO
|
||
(
|
||
teacher_id NVARCHAR2(32) not null,
|
||
job_no VARCHAR2(50),
|
||
name VARCHAR2(100),
|
||
englist_name VARCHAR2(100),
|
||
name_pinyin VARCHAR2(100),
|
||
once_name VARCHAR2(100),
|
||
gender_code VARCHAR2(10),
|
||
birthday NVARCHAR2(32),
|
||
address_code VARCHAR2(100),
|
||
birthplace VARCHAR2(200),
|
||
nationality_code VARCHAR2(10),
|
||
country VARCHAR2(10),
|
||
id_number_no VARCHAR2(30),
|
||
marriage_code VARCHAR2(10),
|
||
adminstrative_code VARCHAR2(10),
|
||
political_code VARCHAR2(10),
|
||
health_code VARCHAR2(10),
|
||
religion_code VARCHAR2(10),
|
||
blood_code VARCHAR2(10),
|
||
photo VARCHAR2(200),
|
||
id_number_effective VARCHAR2(20),
|
||
address_title VARCHAR2(500),
|
||
current_address VARCHAR2(500),
|
||
account_location VARCHAR2(500),
|
||
account_code VARCHAR2(30),
|
||
education_code VARCHAR2(10),
|
||
to_work_time NVARCHAR2(32),
|
||
to_school_time NVARCHAR2(32),
|
||
to_teacher_time NVARCHAR2(32),
|
||
prepared_code VARCHAR2(10),
|
||
file_code VARCHAR2(10),
|
||
file_title VARCHAR2(500),
|
||
comm_address VARCHAR2(500),
|
||
phone VARCHAR2(100),
|
||
postal_code VARCHAR2(6),
|
||
email_address VARCHAR2(50),
|
||
homepage_address VARCHAR2(200),
|
||
advantage VARCHAR2(200),
|
||
post_code VARCHAR2(10),
|
||
section_time VARCHAR2(10),
|
||
ocp_type VARCHAR2(1),
|
||
source_type VARCHAR2(20),
|
||
jx_education_code VARCHAR2(20),
|
||
teacher_code VARCHAR2(50),
|
||
teacher_title VARCHAR2(20),
|
||
teacher_title_time NVARCHAR2(32),
|
||
grad_school VARCHAR2(50),
|
||
grad_school_time NVARCHAR2(32),
|
||
major_studied VARCHAR2(50),
|
||
spouse_name VARCHAR2(20),
|
||
spouse_dw VARCHAR2(200),
|
||
family_origin VARCHAR2(20),
|
||
english_name VARCHAR2(50),
|
||
card_no VARCHAR2(50),
|
||
native_place VARCHAR2(50),
|
||
form_employment VARCHAR2(50),
|
||
party_time NVARCHAR2(32),
|
||
highest_education VARCHAR2(10),
|
||
highest_education_schoole VARCHAR2(50),
|
||
highest_education_mch VARCHAR2(50),
|
||
hight_education VARCHAR2(10),
|
||
one_education VARCHAR2(10),
|
||
one_major VARCHAR2(10),
|
||
major_card VARCHAR2(10),
|
||
mandarin_lv VARCHAR2(10),
|
||
english_lv VARCHAR2(10),
|
||
two_languages VARCHAR2(10),
|
||
two_languages_lv VARCHAR2(10),
|
||
gome_phone VARCHAR2(50),
|
||
two_works VARCHAR2(100),
|
||
team_works VARCHAR2(100),
|
||
qq_no VARCHAR2(100),
|
||
passport_no VARCHAR2(20),
|
||
belong_school_id NVARCHAR2(32),
|
||
id_card VARCHAR2(64),
|
||
check_date NVARCHAR2(32),
|
||
check_status VARCHAR2(2),
|
||
check_user NVARCHAR2(32),
|
||
modify_date NVARCHAR2(32),
|
||
del_flag VARCHAR2(2) default 0,
|
||
belong_dept_id NVARCHAR2(32),
|
||
picture_one_image VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 17M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_TEACHER_INFO
|
||
is '教师基础信息表';
|
||
-- Add comments to the columns
|
||
comment on column BD_TEACHER_INFO.teacher_id
|
||
is '教师编号(主键,关联stb_customer usercode)';
|
||
comment on column BD_TEACHER_INFO.job_no
|
||
is '工号 (教职工的职工号,学校管理内部使用,学校自编)';
|
||
comment on column BD_TEACHER_INFO.name
|
||
is '姓名';
|
||
comment on column BD_TEACHER_INFO.englist_name
|
||
is '英文姓名';
|
||
comment on column BD_TEACHER_INFO.name_pinyin
|
||
is '姓名拼音';
|
||
comment on column BD_TEACHER_INFO.once_name
|
||
is '曾用名';
|
||
comment on column BD_TEACHER_INFO.gender_code
|
||
is '性别码';
|
||
comment on column BD_TEACHER_INFO.birthday
|
||
is '出生日期';
|
||
comment on column BD_TEACHER_INFO.address_code
|
||
is '出生地码';
|
||
comment on column BD_TEACHER_INFO.birthplace
|
||
is '籍贯';
|
||
comment on column BD_TEACHER_INFO.nationality_code
|
||
is '民族码';
|
||
comment on column BD_TEACHER_INFO.country
|
||
is '国籍/地区码';
|
||
comment on column BD_TEACHER_INFO.id_number_no
|
||
is '身份证件类型码';
|
||
comment on column BD_TEACHER_INFO.marriage_code
|
||
is '婚姻状况码';
|
||
comment on column BD_TEACHER_INFO.adminstrative_code
|
||
is '港澳台侨外码';
|
||
comment on column BD_TEACHER_INFO.political_code
|
||
is '政治面貌码';
|
||
comment on column BD_TEACHER_INFO.health_code
|
||
is '健康状况码';
|
||
comment on column BD_TEACHER_INFO.religion_code
|
||
is '信仰宗教码';
|
||
comment on column BD_TEACHER_INFO.blood_code
|
||
is '血型码';
|
||
comment on column BD_TEACHER_INFO.photo
|
||
is '照片';
|
||
comment on column BD_TEACHER_INFO.id_number_effective
|
||
is '身份证件有效期';
|
||
comment on column BD_TEACHER_INFO.address_title
|
||
is '家庭住址';
|
||
comment on column BD_TEACHER_INFO.current_address
|
||
is '现住址';
|
||
comment on column BD_TEACHER_INFO.account_location
|
||
is '户口所在地';
|
||
comment on column BD_TEACHER_INFO.account_code
|
||
is '户口性质码';
|
||
comment on column BD_TEACHER_INFO.education_code
|
||
is '学历码(最高学历)';
|
||
comment on column BD_TEACHER_INFO.to_work_time
|
||
is '参加工作年月';
|
||
comment on column BD_TEACHER_INFO.to_school_time
|
||
is '来校年月';
|
||
comment on column BD_TEACHER_INFO.to_teacher_time
|
||
is '从教年月';
|
||
comment on column BD_TEACHER_INFO.prepared_code
|
||
is '编制类别码(人员类别)';
|
||
comment on column BD_TEACHER_INFO.file_code
|
||
is '档案编号';
|
||
comment on column BD_TEACHER_INFO.file_title
|
||
is '档案文本';
|
||
comment on column BD_TEACHER_INFO.comm_address
|
||
is '通信地址';
|
||
comment on column BD_TEACHER_INFO.phone
|
||
is '联系电话';
|
||
comment on column BD_TEACHER_INFO.postal_code
|
||
is '邮政编码';
|
||
comment on column BD_TEACHER_INFO.email_address
|
||
is '电子信箱';
|
||
comment on column BD_TEACHER_INFO.homepage_address
|
||
is '主页地址';
|
||
comment on column BD_TEACHER_INFO.advantage
|
||
is '特长';
|
||
comment on column BD_TEACHER_INFO.post_code
|
||
is '岗位职业码';
|
||
comment on column BD_TEACHER_INFO.section_time
|
||
is '主要任课学段';
|
||
comment on column BD_TEACHER_INFO.ocp_type
|
||
is '0正式1临时';
|
||
comment on column BD_TEACHER_INFO.source_type
|
||
is '来源类别';
|
||
comment on column BD_TEACHER_INFO.jx_education_code
|
||
is '继续教育证编号';
|
||
comment on column BD_TEACHER_INFO.teacher_code
|
||
is '教师证号';
|
||
comment on column BD_TEACHER_INFO.teacher_title
|
||
is '技术职称';
|
||
comment on column BD_TEACHER_INFO.teacher_title_time
|
||
is '技术职称评定日期';
|
||
comment on column BD_TEACHER_INFO.grad_school
|
||
is '毕业学校';
|
||
comment on column BD_TEACHER_INFO.grad_school_time
|
||
is '毕业年月';
|
||
comment on column BD_TEACHER_INFO.major_studied
|
||
is '所学专业';
|
||
comment on column BD_TEACHER_INFO.spouse_name
|
||
is '配偶姓名';
|
||
comment on column BD_TEACHER_INFO.spouse_dw
|
||
is '配偶单位';
|
||
comment on column BD_TEACHER_INFO.family_origin
|
||
is '家庭出身';
|
||
comment on column BD_TEACHER_INFO.english_name
|
||
is '英文名';
|
||
comment on column BD_TEACHER_INFO.card_no
|
||
is '证件号码(证件号码同时同步stb_customer SFZJH)';
|
||
comment on column BD_TEACHER_INFO.native_place
|
||
is '籍贯';
|
||
comment on column BD_TEACHER_INFO.form_employment
|
||
is '用人形式';
|
||
comment on column BD_TEACHER_INFO.party_time
|
||
is '参加党派时间';
|
||
comment on column BD_TEACHER_INFO.highest_education
|
||
is '最高学历专业';
|
||
comment on column BD_TEACHER_INFO.highest_education_schoole
|
||
is '获得最高学历的院校或机构';
|
||
comment on column BD_TEACHER_INFO.highest_education_mch
|
||
is '获得最高学位的院校或机构';
|
||
comment on column BD_TEACHER_INFO.hight_education
|
||
is '最高学位';
|
||
comment on column BD_TEACHER_INFO.one_education
|
||
is '第一学历';
|
||
comment on column BD_TEACHER_INFO.one_major
|
||
is '第一学历专业';
|
||
comment on column BD_TEACHER_INFO.major_card
|
||
is '教育技术能力证书';
|
||
comment on column BD_TEACHER_INFO.mandarin_lv
|
||
is '普通话等级';
|
||
comment on column BD_TEACHER_INFO.english_lv
|
||
is '英语水平';
|
||
comment on column BD_TEACHER_INFO.two_languages
|
||
is '第二外语语种';
|
||
comment on column BD_TEACHER_INFO.two_languages_lv
|
||
is '第二外语水平';
|
||
comment on column BD_TEACHER_INFO.gome_phone
|
||
is '家庭电话';
|
||
comment on column BD_TEACHER_INFO.two_works
|
||
is '社会兼职';
|
||
comment on column BD_TEACHER_INFO.team_works
|
||
is '学术团体兼职';
|
||
comment on column BD_TEACHER_INFO.qq_no
|
||
is 'QQ号码';
|
||
comment on column BD_TEACHER_INFO.passport_no
|
||
is '护照号';
|
||
comment on column BD_TEACHER_INFO.belong_school_id
|
||
is '所属学校编号';
|
||
comment on column BD_TEACHER_INFO.id_card
|
||
is 'E卡通号';
|
||
comment on column BD_TEACHER_INFO.check_date
|
||
is '审核时间';
|
||
comment on column BD_TEACHER_INFO.check_status
|
||
is '审核状态:0未审核 1学校审核通过2区审核通过3市审核通过 4审核不通过';
|
||
comment on column BD_TEACHER_INFO.check_user
|
||
is '审核人';
|
||
comment on column BD_TEACHER_INFO.modify_date
|
||
is '处理时间';
|
||
comment on column BD_TEACHER_INFO.del_flag
|
||
is '删除状态:1删除 0正常';
|
||
comment on column BD_TEACHER_INFO.belong_dept_id
|
||
is '所属学校部门编号';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_TEACHER_INFO
|
||
add constraint PK_BD_TEACHER_INFO primary key (TEACHER_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 2M
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table BD_TEACHER_SUBJECT
|
||
(
|
||
id VARCHAR2(32) not null,
|
||
teacher_id VARCHAR2(32),
|
||
subject_id VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table BD_TEACHER_SUBJECT
|
||
is '教师科目表';
|
||
-- Add comments to the columns
|
||
comment on column BD_TEACHER_SUBJECT.teacher_id
|
||
is '教师编号';
|
||
comment on column BD_TEACHER_SUBJECT.subject_id
|
||
is '科目编号';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table BD_TEACHER_SUBJECT
|
||
add constraint PK_BD_TEACHER_SUBJECT primary key (ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_CONFIG
|
||
(
|
||
config_id NUMBER not null,
|
||
config_name VARCHAR2(100) default '',
|
||
config_key VARCHAR2(100) default '',
|
||
config_value VARCHAR2(100) default '',
|
||
config_type CHAR(1) default 'N',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_CONFIG
|
||
is '参数配置表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_CONFIG.config_id
|
||
is '参数主键seq_sys_config.nextval';
|
||
comment on column SYS_CONFIG.config_name
|
||
is '参数名称';
|
||
comment on column SYS_CONFIG.config_key
|
||
is '参数键名';
|
||
comment on column SYS_CONFIG.config_value
|
||
is '参数键值';
|
||
comment on column SYS_CONFIG.config_type
|
||
is '系统内置(Y是 N否)';
|
||
comment on column SYS_CONFIG.create_by
|
||
is '创建者';
|
||
comment on column SYS_CONFIG.create_time
|
||
is '创建时间';
|
||
comment on column SYS_CONFIG.update_by
|
||
is '更新者';
|
||
comment on column SYS_CONFIG.update_time
|
||
is '更新时间';
|
||
comment on column SYS_CONFIG.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_CONFIG
|
||
add constraint PK_SYS_CONFIG primary key (CONFIG_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_DEPT
|
||
(
|
||
dept_id VARCHAR2(32) not null,
|
||
parent_id VARCHAR2(32) default 0,
|
||
ancestors VARCHAR2(50) default '',
|
||
dept_name VARCHAR2(100) default '',
|
||
order_num VARCHAR2(100) default 0,
|
||
leader VARCHAR2(20),
|
||
phone VARCHAR2(50),
|
||
email VARCHAR2(50),
|
||
status CHAR(1) default '0',
|
||
del_flag CHAR(1) default '0',
|
||
create_by VARCHAR2(264) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
dept_type CHAR(1),
|
||
dept_type_id VARCHAR2(32)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 1M
|
||
next 8K
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_DEPT
|
||
is '部门信息表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_DEPT.dept_id
|
||
is '部门主键seq_sys_dept.nextval';
|
||
comment on column SYS_DEPT.parent_id
|
||
is '父部门id';
|
||
comment on column SYS_DEPT.ancestors
|
||
is '祖级列表';
|
||
comment on column SYS_DEPT.dept_name
|
||
is '部门名称';
|
||
comment on column SYS_DEPT.order_num
|
||
is '显示顺序';
|
||
comment on column SYS_DEPT.leader
|
||
is '负责人';
|
||
comment on column SYS_DEPT.phone
|
||
is '联系电话';
|
||
comment on column SYS_DEPT.email
|
||
is '邮箱';
|
||
comment on column SYS_DEPT.status
|
||
is '部门状态(0正常 1停用)';
|
||
comment on column SYS_DEPT.del_flag
|
||
is '删除标志(0代表存在 2代表删除)';
|
||
comment on column SYS_DEPT.create_by
|
||
is '创建者';
|
||
comment on column SYS_DEPT.create_time
|
||
is '创建时间';
|
||
comment on column SYS_DEPT.update_by
|
||
is '更新者';
|
||
comment on column SYS_DEPT.update_time
|
||
is '更新时间';
|
||
comment on column SYS_DEPT.dept_type
|
||
is '对应类型(0市 1区 2学校 3年级 4班级)';
|
||
comment on column SYS_DEPT.dept_type_id
|
||
is '对应学校、年级、班级主键';
|
||
-- Create/Recreate indexes
|
||
create index INDEX_ANCESTORS on SYS_DEPT (ANCESTORS)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
create index INDEX_DEPT_TYPE_ID on SYS_DEPT (DEPT_TYPE_ID)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_DEPT
|
||
add constraint PK_SYS_DEPT primary key (DEPT_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 768K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_DICT_DATA
|
||
(
|
||
dict_code NUMBER not null,
|
||
dict_sort NUMBER default 0,
|
||
dict_label VARCHAR2(100) default '',
|
||
dict_value VARCHAR2(100) default '',
|
||
dict_type VARCHAR2(100) default '',
|
||
css_class VARCHAR2(100),
|
||
list_class VARCHAR2(100),
|
||
is_default CHAR(1) default 'N',
|
||
status CHAR(1) default '0',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_DICT_DATA
|
||
is '字典数据表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_DICT_DATA.dict_code
|
||
is '字典主键seq_sys_dict_data.nextval';
|
||
comment on column SYS_DICT_DATA.dict_sort
|
||
is '字典排序';
|
||
comment on column SYS_DICT_DATA.dict_label
|
||
is '字典标签';
|
||
comment on column SYS_DICT_DATA.dict_value
|
||
is '字典键值';
|
||
comment on column SYS_DICT_DATA.dict_type
|
||
is '字典类型';
|
||
comment on column SYS_DICT_DATA.css_class
|
||
is '样式属性(其他样式扩展)';
|
||
comment on column SYS_DICT_DATA.list_class
|
||
is '表格回显样式';
|
||
comment on column SYS_DICT_DATA.is_default
|
||
is '是否默认(Y是 N否)';
|
||
comment on column SYS_DICT_DATA.status
|
||
is '状态(0正常 1停用)';
|
||
comment on column SYS_DICT_DATA.create_by
|
||
is '创建者';
|
||
comment on column SYS_DICT_DATA.create_time
|
||
is '创建时间';
|
||
comment on column SYS_DICT_DATA.update_by
|
||
is '更新者';
|
||
comment on column SYS_DICT_DATA.update_time
|
||
is '更新时间';
|
||
comment on column SYS_DICT_DATA.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_DICT_DATA
|
||
add constraint PK_SYS_DICT_DATA primary key (DICT_CODE)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_DICT_TYPE
|
||
(
|
||
dict_id NUMBER not null,
|
||
dict_name VARCHAR2(100) default '',
|
||
dict_type VARCHAR2(100) default '',
|
||
status CHAR(1) default '0',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_DICT_TYPE
|
||
is '字典类型表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_DICT_TYPE.dict_id
|
||
is '字典主键seq_sys_dict_type.nextval';
|
||
comment on column SYS_DICT_TYPE.dict_name
|
||
is '字典名称';
|
||
comment on column SYS_DICT_TYPE.dict_type
|
||
is '字典类型';
|
||
comment on column SYS_DICT_TYPE.status
|
||
is '状态(0正常 1停用)';
|
||
comment on column SYS_DICT_TYPE.create_by
|
||
is '创建者';
|
||
comment on column SYS_DICT_TYPE.create_time
|
||
is '创建时间';
|
||
comment on column SYS_DICT_TYPE.update_by
|
||
is '更新者';
|
||
comment on column SYS_DICT_TYPE.update_time
|
||
is '更新时间';
|
||
comment on column SYS_DICT_TYPE.remark
|
||
is '备注';
|
||
-- Create/Recreate indexes
|
||
create unique index SYS_DICT_TYPE_INDEX1 on SYS_DICT_TYPE (DICT_TYPE)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_DICT_TYPE
|
||
add constraint PK_SYS_DICT_TYPE primary key (DICT_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_JOB
|
||
(
|
||
job_id NUMBER not null,
|
||
job_name VARCHAR2(64) default '' not null,
|
||
job_group VARCHAR2(64) default '' not null,
|
||
method_name VARCHAR2(500) default '',
|
||
method_params VARCHAR2(200),
|
||
cron_expression VARCHAR2(255) default '',
|
||
misfire_policy VARCHAR2(20) default '3',
|
||
concurrent CHAR(1) default '1',
|
||
status CHAR(1) default '0',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500) default ''
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_JOB
|
||
is '定时任务调度表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_JOB.job_id
|
||
is '任务主键seq_sys_job.nextval';
|
||
comment on column SYS_JOB.job_name
|
||
is '任务名称';
|
||
comment on column SYS_JOB.job_group
|
||
is '任务组名';
|
||
comment on column SYS_JOB.method_name
|
||
is '任务方法';
|
||
comment on column SYS_JOB.method_params
|
||
is '方法参数';
|
||
comment on column SYS_JOB.cron_expression
|
||
is 'cron执行表达式';
|
||
comment on column SYS_JOB.misfire_policy
|
||
is '计划执行错误策略(1立即执行 2执行一次 3放弃执行)';
|
||
comment on column SYS_JOB.concurrent
|
||
is '是否并发执行(0允许 1禁止)';
|
||
comment on column SYS_JOB.status
|
||
is '状态(0正常 1暂停)';
|
||
comment on column SYS_JOB.create_by
|
||
is '创建者';
|
||
comment on column SYS_JOB.create_time
|
||
is '创建时间';
|
||
comment on column SYS_JOB.update_by
|
||
is '更新者';
|
||
comment on column SYS_JOB.update_time
|
||
is '更新时间';
|
||
comment on column SYS_JOB.remark
|
||
is '备注信息';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_JOB
|
||
add constraint PK_SYS_JOB primary key (JOB_ID, JOB_NAME, JOB_GROUP)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_LOGININFOR
|
||
(
|
||
info_id NUMBER not null,
|
||
login_name VARCHAR2(50) default '',
|
||
ipaddr VARCHAR2(50) default '',
|
||
login_location VARCHAR2(255) default '',
|
||
browser VARCHAR2(50) default '',
|
||
os VARCHAR2(50) default '',
|
||
status CHAR(1) default '0',
|
||
msg VARCHAR2(255) default '',
|
||
login_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_LOGININFOR
|
||
is '系统访问记录';
|
||
-- Add comments to the columns
|
||
comment on column SYS_LOGININFOR.info_id
|
||
is '访问主键seq_seq_sys_logininfor.nextval';
|
||
comment on column SYS_LOGININFOR.login_name
|
||
is '登录账号';
|
||
comment on column SYS_LOGININFOR.ipaddr
|
||
is '登录IP地址';
|
||
comment on column SYS_LOGININFOR.login_location
|
||
is '登录地点';
|
||
comment on column SYS_LOGININFOR.browser
|
||
is '浏览器类型';
|
||
comment on column SYS_LOGININFOR.os
|
||
is '操作系统';
|
||
comment on column SYS_LOGININFOR.status
|
||
is '登录状态(0成功 1失败)';
|
||
comment on column SYS_LOGININFOR.msg
|
||
is '提示消息';
|
||
comment on column SYS_LOGININFOR.login_time
|
||
is '访问时间';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_LOGININFOR
|
||
add constraint PK_SYS_LOGININFOR primary key (INFO_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_MENU
|
||
(
|
||
menu_id NUMBER not null,
|
||
menu_name VARCHAR2(50) not null,
|
||
parent_id NUMBER default 0,
|
||
order_num NUMBER default 0,
|
||
url VARCHAR2(200) default '#',
|
||
menu_type CHAR(1) default '',
|
||
visible CHAR(1) default 0,
|
||
perms VARCHAR2(100),
|
||
icon VARCHAR2(100) default '#',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500) default ''
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_MENU
|
||
is '菜单权限表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_MENU.menu_id
|
||
is '菜单主键seq_sys_post.nextval';
|
||
comment on column SYS_MENU.menu_name
|
||
is '菜单名称';
|
||
comment on column SYS_MENU.parent_id
|
||
is '父菜单ID';
|
||
comment on column SYS_MENU.order_num
|
||
is '显示顺序';
|
||
comment on column SYS_MENU.url
|
||
is '请求地址';
|
||
comment on column SYS_MENU.menu_type
|
||
is '菜单类型(M目录 C菜单 F按钮)';
|
||
comment on column SYS_MENU.visible
|
||
is '菜单状态(0显示 1隐藏)';
|
||
comment on column SYS_MENU.perms
|
||
is '权限标识';
|
||
comment on column SYS_MENU.icon
|
||
is '菜单图标';
|
||
comment on column SYS_MENU.create_by
|
||
is '创建者';
|
||
comment on column SYS_MENU.create_time
|
||
is '创建时间';
|
||
comment on column SYS_MENU.update_by
|
||
is '更新者';
|
||
comment on column SYS_MENU.update_time
|
||
is '更新时间';
|
||
comment on column SYS_MENU.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_MENU
|
||
add constraint PK_SYS_MENU primary key (MENU_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_NOTICE
|
||
(
|
||
notice_id NUMBER not null,
|
||
notice_title VARCHAR2(50) not null,
|
||
notice_type CHAR(1) not null,
|
||
notice_content VARCHAR2(2000),
|
||
status CHAR(1) default '0',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(255)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_NOTICE
|
||
is '通知公告表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_NOTICE.notice_id
|
||
is '公告主键seq_sys_notice.nextval';
|
||
comment on column SYS_NOTICE.notice_title
|
||
is '公告标题';
|
||
comment on column SYS_NOTICE.notice_type
|
||
is '公告类型(1通知 2公告)';
|
||
comment on column SYS_NOTICE.notice_content
|
||
is '公告内容';
|
||
comment on column SYS_NOTICE.status
|
||
is '公告状态(0正常 1关闭)';
|
||
comment on column SYS_NOTICE.create_by
|
||
is '创建者';
|
||
comment on column SYS_NOTICE.create_time
|
||
is '创建时间';
|
||
comment on column SYS_NOTICE.update_by
|
||
is '更新者';
|
||
comment on column SYS_NOTICE.update_time
|
||
is '更新时间';
|
||
comment on column SYS_NOTICE.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_NOTICE
|
||
add constraint PK_SYS_NOTICE primary key (NOTICE_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_OPER_LOG
|
||
(
|
||
oper_id NUMBER not null,
|
||
title VARCHAR2(50) default '',
|
||
business_type NUMBER default 0,
|
||
method VARCHAR2(100) default '',
|
||
operator_type NUMBER default 0,
|
||
oper_name VARCHAR2(50) default '',
|
||
dept_name VARCHAR2(50) default '',
|
||
oper_url VARCHAR2(255) default '',
|
||
oper_ip VARCHAR2(50) default '',
|
||
oper_location VARCHAR2(255) default '',
|
||
oper_param VARCHAR2(4000) default '',
|
||
status NUMBER default 0,
|
||
error_msg VARCHAR2(4000) default '',
|
||
oper_time DATE
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_OPER_LOG
|
||
is '操作日志记录';
|
||
-- Add comments to the columns
|
||
comment on column SYS_OPER_LOG.oper_id
|
||
is '日志主键seq_sys_oper_log.nextval';
|
||
comment on column SYS_OPER_LOG.title
|
||
is '模块标题';
|
||
comment on column SYS_OPER_LOG.business_type
|
||
is '业务类型(0其它 1新增 2修改 3删除)';
|
||
comment on column SYS_OPER_LOG.method
|
||
is '方法名称';
|
||
comment on column SYS_OPER_LOG.operator_type
|
||
is '操作类别(0其它 1后台用户 2手机端用户)';
|
||
comment on column SYS_OPER_LOG.oper_name
|
||
is '操作人员';
|
||
comment on column SYS_OPER_LOG.dept_name
|
||
is '部门名称';
|
||
comment on column SYS_OPER_LOG.oper_url
|
||
is '请求URL';
|
||
comment on column SYS_OPER_LOG.oper_ip
|
||
is '主机地址';
|
||
comment on column SYS_OPER_LOG.oper_location
|
||
is '操作地点';
|
||
comment on column SYS_OPER_LOG.oper_param
|
||
is '请求参数';
|
||
comment on column SYS_OPER_LOG.status
|
||
is '操作状态(0正常 1异常)';
|
||
comment on column SYS_OPER_LOG.error_msg
|
||
is '错误消息';
|
||
comment on column SYS_OPER_LOG.oper_time
|
||
is '操作时间';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_OPER_LOG
|
||
add constraint PK_SYS_OPER_LOG primary key (OPER_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_POST
|
||
(
|
||
post_id NUMBER not null,
|
||
post_code VARCHAR2(64) not null,
|
||
post_name VARCHAR2(50) not null,
|
||
post_sort NUMBER not null,
|
||
status CHAR(1) not null,
|
||
create_by VARCHAR2(264) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_POST
|
||
is '岗位信息表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_POST.post_id
|
||
is '岗位主键seq_sys_post.nextval';
|
||
comment on column SYS_POST.post_code
|
||
is '岗位编码';
|
||
comment on column SYS_POST.post_name
|
||
is '岗位名称';
|
||
comment on column SYS_POST.post_sort
|
||
is '显示顺序';
|
||
comment on column SYS_POST.status
|
||
is '状态(0正常 1停用)';
|
||
comment on column SYS_POST.create_by
|
||
is '创建者';
|
||
comment on column SYS_POST.create_time
|
||
is '创建时间';
|
||
comment on column SYS_POST.update_by
|
||
is '更新者';
|
||
comment on column SYS_POST.update_time
|
||
is '更新时间';
|
||
comment on column SYS_POST.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_POST
|
||
add constraint PK_SYS_POST primary key (POST_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_ROLE
|
||
(
|
||
role_id NUMBER not null,
|
||
role_name VARCHAR2(30) not null,
|
||
role_key VARCHAR2(100) not null,
|
||
role_sort NUMBER not null,
|
||
data_scope CHAR(1) default '1',
|
||
status CHAR(1) not null,
|
||
del_flag CHAR(1) default '0',
|
||
create_by VARCHAR2(64) default '',
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_ROLE
|
||
is '角色信息表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_ROLE.role_id
|
||
is '角色主键seq_sys_post.nextval';
|
||
comment on column SYS_ROLE.role_name
|
||
is '角色名称';
|
||
comment on column SYS_ROLE.role_key
|
||
is '角色权限字符串';
|
||
comment on column SYS_ROLE.role_sort
|
||
is '显示顺序';
|
||
comment on column SYS_ROLE.data_scope
|
||
is '数据范围(1:全部数据权限 2:自定数据权限)';
|
||
comment on column SYS_ROLE.status
|
||
is '角色状态(0正常 1停用)';
|
||
comment on column SYS_ROLE.del_flag
|
||
is '删除标志(0代表存在 2代表删除)';
|
||
comment on column SYS_ROLE.create_by
|
||
is '创建者';
|
||
comment on column SYS_ROLE.create_time
|
||
is '创建时间';
|
||
comment on column SYS_ROLE.update_by
|
||
is '更新者';
|
||
comment on column SYS_ROLE.update_time
|
||
is '更新时间';
|
||
comment on column SYS_ROLE.remark
|
||
is '备注';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_ROLE
|
||
add constraint PK_SYS_ROLE primary key (ROLE_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_ROLE_DEPT
|
||
(
|
||
role_id NUMBER not null,
|
||
dept_id NUMBER not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_ROLE_DEPT
|
||
is '角色和部门关联表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_ROLE_DEPT.role_id
|
||
is '角色ID';
|
||
comment on column SYS_ROLE_DEPT.dept_id
|
||
is '部门ID';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_ROLE_DEPT
|
||
add constraint PK_SYS_ROLE_DEPT primary key (ROLE_ID, DEPT_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_ROLE_MENU
|
||
(
|
||
role_id NUMBER not null,
|
||
menu_id NUMBER not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_ROLE_MENU
|
||
is '角色和菜单关联表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_ROLE_MENU.role_id
|
||
is '角色ID';
|
||
comment on column SYS_ROLE_MENU.menu_id
|
||
is '菜单ID';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_ROLE_MENU
|
||
add constraint PK_SYS_ROLE_MENU primary key (ROLE_ID, MENU_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_USER
|
||
(
|
||
user_id VARCHAR2(32) not null,
|
||
dept_id VARCHAR2(32),
|
||
login_name VARCHAR2(30) not null,
|
||
user_name VARCHAR2(128) not null,
|
||
user_type VARCHAR2(2) default '00',
|
||
email VARCHAR2(50) default '',
|
||
phonenumber VARCHAR2(11) default '',
|
||
sex CHAR(1) default '0',
|
||
avatar VARCHAR2(100) default '',
|
||
password VARCHAR2(50) default '',
|
||
salt VARCHAR2(20) default '',
|
||
status CHAR(1) default '0',
|
||
del_flag CHAR(1) default '0',
|
||
login_ip VARCHAR2(50) default '',
|
||
login_date DATE,
|
||
create_by VARCHAR2(64),
|
||
create_time DATE,
|
||
update_by VARCHAR2(64) default '',
|
||
update_time DATE,
|
||
remark VARCHAR2(500) default '',
|
||
first_login_flag CHAR(1)
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_USER
|
||
is '用户信息表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_USER.user_id
|
||
is '用户主键seq_sys_user.nextval';
|
||
comment on column SYS_USER.dept_id
|
||
is '部门ID';
|
||
comment on column SYS_USER.login_name
|
||
is '登录账号';
|
||
comment on column SYS_USER.user_name
|
||
is '用户昵称';
|
||
comment on column SYS_USER.user_type
|
||
is '用户类型(00系统用户)';
|
||
comment on column SYS_USER.email
|
||
is '用户邮箱';
|
||
comment on column SYS_USER.phonenumber
|
||
is '手机号码';
|
||
comment on column SYS_USER.sex
|
||
is '用户性别(0男 1女 2未知)';
|
||
comment on column SYS_USER.avatar
|
||
is '头像路径';
|
||
comment on column SYS_USER.password
|
||
is '密码';
|
||
comment on column SYS_USER.salt
|
||
is '盐加密';
|
||
comment on column SYS_USER.status
|
||
is '帐号状态(0正常 1停用)';
|
||
comment on column SYS_USER.del_flag
|
||
is '删除标志(0代表存在 2代表删除)';
|
||
comment on column SYS_USER.login_ip
|
||
is '最后登陆IP';
|
||
comment on column SYS_USER.login_date
|
||
is '最后登陆时间';
|
||
comment on column SYS_USER.create_by
|
||
is '创建者';
|
||
comment on column SYS_USER.create_time
|
||
is '创建时间';
|
||
comment on column SYS_USER.update_by
|
||
is '更新者';
|
||
comment on column SYS_USER.update_time
|
||
is '更新时间';
|
||
comment on column SYS_USER.remark
|
||
is '备注';
|
||
comment on column SYS_USER.first_login_flag
|
||
is '是否初次登陆,初次登陆需要修改密码(0是1否)';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_USER
|
||
add constraint PK_SYS_USER primary key (USER_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_USER_ONLINE
|
||
(
|
||
sessionid VARCHAR2(50) default '' not null,
|
||
login_name VARCHAR2(50) default '',
|
||
dept_name VARCHAR2(50) default '',
|
||
ipaddr VARCHAR2(50) default '',
|
||
login_location VARCHAR2(255) default '',
|
||
browser VARCHAR2(50) default '',
|
||
os VARCHAR2(50) default '',
|
||
status VARCHAR2(10) default '',
|
||
start_timestamp DATE,
|
||
last_access_time DATE,
|
||
expire_time NUMBER default 0
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 128K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_USER_ONLINE
|
||
is '在线用户记录';
|
||
-- Add comments to the columns
|
||
comment on column SYS_USER_ONLINE.sessionid
|
||
is '用户会话id';
|
||
comment on column SYS_USER_ONLINE.login_name
|
||
is '登录账号';
|
||
comment on column SYS_USER_ONLINE.dept_name
|
||
is '部门名称';
|
||
comment on column SYS_USER_ONLINE.ipaddr
|
||
is '登录IP地址';
|
||
comment on column SYS_USER_ONLINE.login_location
|
||
is '登录地点';
|
||
comment on column SYS_USER_ONLINE.browser
|
||
is '浏览器类型';
|
||
comment on column SYS_USER_ONLINE.os
|
||
is '操作系统';
|
||
comment on column SYS_USER_ONLINE.status
|
||
is '在线状态on_line在线off_line离线';
|
||
comment on column SYS_USER_ONLINE.start_timestamp
|
||
is 'session创建时间';
|
||
comment on column SYS_USER_ONLINE.last_access_time
|
||
is 'session最后访问时间';
|
||
comment on column SYS_USER_ONLINE.expire_time
|
||
is '超时时间,单位为分钟';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_USER_ONLINE
|
||
add constraint PK_SYS_USER_ONLINE primary key (SESSIONID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Create table
|
||
create table SYS_USER_POST
|
||
(
|
||
user_id NUMBER not null,
|
||
post_id NUMBER not null
|
||
)
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 1
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
-- Add comments to the table
|
||
comment on table SYS_USER_POST
|
||
is '用户与岗位关联表';
|
||
-- Add comments to the columns
|
||
comment on column SYS_USER_POST.user_id
|
||
is '用户ID';
|
||
comment on column SYS_USER_POST.post_id
|
||
is '岗位ID';
|
||
-- Create/Recreate primary, unique and foreign key constraints
|
||
alter table SYS_USER_POST
|
||
add constraint PK_SYS_USER_POST primary key (USER_ID, POST_ID)
|
||
using index
|
||
tablespace SZDJ_TABLESPASE
|
||
pctfree 10
|
||
initrans 2
|
||
maxtrans 255
|
||
storage
|
||
(
|
||
initial 64K
|
||
next 1M
|
||
minextents 1
|
||
maxextents unlimited
|
||
);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|