2_table.sql 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. CREATE TABLE cas_branch_info
  2. (
  3. id integer NOT NULL DEFAULT nextval('seq_cas_branch_info'::regclass),
  4. name character varying NOT NULL,
  5. cas_branch_type integer,
  6. remark character varying,
  7. seq integer,
  8. delete_flag integer NOT NULL DEFAULT 0,
  9. aid integer,
  10. atime timestamp without time zone NOT NULL DEFAULT now(),
  11. mid integer,
  12. mtime timestamp without time zone DEFAULT now(),
  13. CONSTRAINT pkey_cas_branch_info PRIMARY KEY (id)
  14. )
  15. WITH (
  16. OIDS=FALSE
  17. );
  18. ALTER TABLE cas_branch_info
  19. OWNER TO postgres;
  20. COMMENT ON TABLE cas_branch_info
  21. IS '学会信息表';
  22. COMMENT ON COLUMN cas_branch_info.id IS 'pk';
  23. COMMENT ON COLUMN cas_branch_info.name IS '学会名称';
  24. COMMENT ON COLUMN cas_branch_info.cas_branch_type IS '学会类型';
  25. COMMENT ON COLUMN cas_branch_info.remark IS '描述';
  26. COMMENT ON COLUMN cas_branch_info.seq IS '排序';
  27. COMMENT ON COLUMN cas_branch_info.delete_flag IS '删除标记';
  28. COMMENT ON COLUMN cas_branch_info.aid IS '记录新增人员ID';
  29. COMMENT ON COLUMN cas_branch_info.atime IS '记录新增时间';
  30. COMMENT ON COLUMN cas_branch_info.mid IS '记录修改人员ID';
  31. COMMENT ON COLUMN cas_branch_info.mtime IS '记录修改时间';
  32. CREATE TABLE cas_branch_user_relation
  33. (
  34. id integer NOT NULL DEFAULT nextval('seq_cas_branch_user_relation'::regclass),
  35. lsp_user_id integer NOT NULL,
  36. branch_id integer NOT NULL,
  37. aid integer,
  38. atime timestamp without time zone NOT NULL DEFAULT now(),
  39. mid integer,
  40. mtime timestamp without time zone DEFAULT now(),
  41. CONSTRAINT pkey_cas_branch_user_relation PRIMARY KEY (id)
  42. )
  43. WITH (
  44. OIDS=FALSE
  45. );
  46. ALTER TABLE cas_branch_user_relation
  47. OWNER TO postgres;
  48. COMMENT ON TABLE cas_branch_user_relation
  49. IS '学会用户关联表';
  50. COMMENT ON COLUMN cas_branch_user_relation.id IS 'pk';
  51. COMMENT ON COLUMN cas_branch_user_relation.lsp_user_id IS '姓名';
  52. COMMENT ON COLUMN cas_branch_user_relation.branch_id IS '性别';
  53. COMMENT ON COLUMN cas_branch_user_relation.aid IS '记录新增人员ID';
  54. COMMENT ON COLUMN cas_branch_user_relation.atime IS '记录新增时间';
  55. COMMENT ON COLUMN cas_branch_user_relation.mid IS '记录修改人员ID';
  56. COMMENT ON COLUMN cas_branch_user_relation.mtime IS '记录修改时间';
  57. CREATE TABLE cas_user_info
  58. (
  59. id integer NOT NULL DEFAULT nextval('seq_cas_user_info'::regclass),
  60. lsp_user_id integer,
  61. name character varying NOT NULL,
  62. sex integer,
  63. birthday timestamp without time zone DEFAULT now(),
  64. id_no character varying,
  65. portrait_id integer,
  66. unit character varying,
  67. cas_unit_status integer,
  68. branch_id integer,
  69. address character varying,
  70. postal_code character varying,
  71. duty character varying,
  72. office_tel character varying,
  73. phone character varying,
  74. email character varying,
  75. success_case character varying,
  76. apply_cause character varying,
  77. cas_user_type integer,
  78. cas_service_require character varying,
  79. apply_time timestamp without time zone DEFAULT now(),
  80. cas_user_approval_status integer,
  81. approval_lsp_user_id integer,
  82. approval_time timestamp without time zone DEFAULT now(),
  83. advice character varying,
  84. cas_user_approval_status_manage integer,
  85. approval_lsp_user_id_manage integer,
  86. approval_time_manage timestamp without time zone DEFAULT now(),
  87. advice_manage character varying,
  88. education integer,
  89. evaluation character varying,
  90. delete_flag integer DEFAULT 0,
  91. nation_type integer,
  92. work_time timestamp without time zone DEFAULT now(),
  93. political_type integer,
  94. work_title character varying,
  95. cas_expert_group integer,
  96. research_direction character varying,
  97. fax character varying,
  98. honor character varying,
  99. join_active character varying,
  100. aid integer,
  101. atime timestamp without time zone NOT NULL DEFAULT now(),
  102. mid integer,
  103. mtime timestamp without time zone DEFAULT now(),
  104. CONSTRAINT pkey_cas_user_info PRIMARY KEY (id)
  105. )
  106. WITH (
  107. OIDS=FALSE
  108. );
  109. ALTER TABLE cas_user_info
  110. OWNER TO postgres;
  111. COMMENT ON TABLE cas_user_info
  112. IS '会员基本信息';
  113. COMMENT ON COLUMN cas_user_info.id IS 'pk';
  114. COMMENT ON COLUMN cas_user_info.name IS '姓名';
  115. COMMENT ON COLUMN cas_user_info.sex IS '性别';
  116. COMMENT ON COLUMN cas_user_info.birthday IS '生日';
  117. COMMENT ON COLUMN cas_user_info.id_no IS '身份证号';
  118. COMMENT ON COLUMN cas_user_info.portrait_id IS '证件照';
  119. COMMENT ON COLUMN cas_user_info.unit IS '单位';
  120. COMMENT ON COLUMN cas_user_info.cas_unit_status IS '单位性质';
  121. COMMENT ON COLUMN cas_user_info.branch_id IS '学会id';
  122. COMMENT ON COLUMN cas_user_info.address IS '通讯地址';
  123. COMMENT ON COLUMN cas_user_info.postal_code IS '邮政编码';
  124. COMMENT ON COLUMN cas_user_info.duty IS '职务';
  125. COMMENT ON COLUMN cas_user_info.office_tel IS '办公电话';
  126. COMMENT ON COLUMN cas_user_info.phone IS '手机号';
  127. COMMENT ON COLUMN cas_user_info.email IS '邮箱';
  128. COMMENT ON COLUMN cas_user_info.success_case IS '业内成果';
  129. COMMENT ON COLUMN cas_user_info.apply_cause IS '申请原因';
  130. COMMENT ON COLUMN cas_user_info.cas_user_type IS '用户类型';
  131. COMMENT ON COLUMN cas_user_info.cas_service_require IS '服务需求';
  132. COMMENT ON COLUMN cas_user_info.apply_time IS '申请时间';
  133. COMMENT ON COLUMN cas_user_info.cas_user_approval_status IS '审核状态';
  134. COMMENT ON COLUMN cas_user_info.approval_lsp_user_id IS '审核人';
  135. COMMENT ON COLUMN cas_user_info.approval_time IS '审核时间';
  136. COMMENT ON COLUMN cas_user_info.advice IS '审核建议';
  137. COMMENT ON COLUMN cas_user_info.cas_user_approval_status_manage IS '总会审核状态';
  138. COMMENT ON COLUMN cas_user_info.approval_lsp_user_id_manage IS '总会审核人';
  139. COMMENT ON COLUMN cas_user_info.approval_time_manage IS '总会审核时间';
  140. COMMENT ON COLUMN cas_user_info.advice_manage IS '总会审核建议';
  141. COMMENT ON COLUMN cas_user_info.education IS '学历';
  142. COMMENT ON COLUMN cas_user_info.evaluation IS '自我评价';
  143. COMMENT ON COLUMN cas_user_info.delete_flag IS '删除标记';
  144. COMMENT ON COLUMN cas_user_info.nation_type IS '民族';
  145. COMMENT ON COLUMN cas_user_info.work_time IS '工作时间';
  146. COMMENT ON COLUMN cas_user_info.political_type IS '政治面貌';
  147. COMMENT ON COLUMN cas_user_info.work_title IS '职称';
  148. COMMENT ON COLUMN cas_user_info.cas_expert_group IS '专家组别';
  149. COMMENT ON COLUMN cas_user_info.research_direction IS '研究方向';
  150. COMMENT ON COLUMN cas_user_info.fax IS '传真';
  151. COMMENT ON COLUMN cas_user_info.honor IS '曾获荣誉';
  152. COMMENT ON COLUMN cas_user_info.join_active IS '参加活动';
  153. COMMENT ON COLUMN cas_user_info.aid IS '记录新增人员ID';
  154. COMMENT ON COLUMN cas_user_info.atime IS '记录新增时间';
  155. COMMENT ON COLUMN cas_user_info.mid IS '记录修改人员ID';
  156. COMMENT ON COLUMN cas_user_info.mtime IS '记录修改时间';
  157. CREATE TABLE cas_approval_history
  158. (
  159. id integer NOT NULL DEFAULT nextval('seq_cas_approval_history'::regclass),
  160. user_id integer,
  161. advice character varying,
  162. cas_user_approval_status integer,
  163. approval_lsp_user_id integer,
  164. apply_time timestamp without time zone NOT NULL DEFAULT now(),
  165. aid integer,
  166. atime timestamp without time zone NOT NULL DEFAULT now(),
  167. CONSTRAINT pkey_cas_approval_history PRIMARY KEY (id)
  168. )
  169. WITH (
  170. OIDS=FALSE
  171. );
  172. ALTER TABLE cas_approval_history
  173. OWNER TO postgres;
  174. COMMENT ON TABLE cas_approval_history
  175. IS '会员审核履历';
  176. COMMENT ON COLUMN cas_approval_history.id IS 'pk';
  177. COMMENT ON COLUMN cas_approval_history.user_id IS '姓名';
  178. COMMENT ON COLUMN cas_approval_history.advice IS '性别';
  179. COMMENT ON COLUMN cas_approval_history.cas_user_approval_status IS '审核状态';
  180. COMMENT ON COLUMN cas_approval_history.approval_lsp_user_id IS '审核人';
  181. COMMENT ON COLUMN cas_approval_history.apply_time IS '申请时间';
  182. COMMENT ON COLUMN cas_approval_history.aid IS '记录新增人员ID';
  183. COMMENT ON COLUMN cas_approval_history.atime IS '记录新增时间';
  184. CREATE TABLE cas_unit_info
  185. (
  186. id integer NOT NULL DEFAULT nextval('seq_cas_unit_info'::regclass),
  187. user_id integer,
  188. name character varying,
  189. cas_unit_status integer,
  190. organ_no character varying,
  191. unit_people_num integer,
  192. register_money character varying,
  193. company_user character varying,
  194. company_sex integer,
  195. company_birthday timestamp without time zone DEFAULT now(),
  196. company_education character varying,
  197. company_title character varying,
  198. company_duty character varying,
  199. company_server_thing character varying,
  200. company_phone character varying,
  201. company_team character varying,
  202. unit_remake character varying,
  203. technological_personnel integer,
  204. technological_high integer,
  205. technological_module integer,
  206. technological_other integer,
  207. company_work character varying,
  208. technological_work_remake character varying,
  209. fax character varying,
  210. delete_flag integer,
  211. aid integer,
  212. atime timestamp without time zone NOT NULL DEFAULT now(),
  213. mid integer,
  214. mtime timestamp without time zone DEFAULT now(),
  215. CONSTRAINT pkey_cas_unit_info PRIMARY KEY (id)
  216. )
  217. WITH (
  218. OIDS=FALSE
  219. );
  220. ALTER TABLE cas_unit_info
  221. OWNER TO postgres;
  222. COMMENT ON TABLE cas_unit_info
  223. IS '单位详细信息';
  224. COMMENT ON COLUMN cas_unit_info.id IS 'pk';
  225. COMMENT ON COLUMN cas_unit_info.user_id IS '用户id';
  226. COMMENT ON COLUMN cas_unit_info.name IS '单位名称';
  227. COMMENT ON COLUMN cas_unit_info.cas_unit_status IS '单位性质';
  228. COMMENT ON COLUMN cas_unit_info.organ_no IS '组织机构代码';
  229. COMMENT ON COLUMN cas_unit_info.unit_people_num IS '单位人数';
  230. COMMENT ON COLUMN cas_unit_info.register_money IS '注册资金';
  231. COMMENT ON COLUMN cas_unit_info.company_user IS '法人姓名';
  232. COMMENT ON COLUMN cas_unit_info.company_sex IS '法人性别';
  233. COMMENT ON COLUMN cas_unit_info.company_birthday IS '法人生日';
  234. COMMENT ON COLUMN cas_unit_info.company_education IS '法人学历';
  235. COMMENT ON COLUMN cas_unit_info.company_title IS '法人职称';
  236. COMMENT ON COLUMN cas_unit_info.company_duty IS '法人职务';
  237. COMMENT ON COLUMN cas_unit_info.company_server_thing IS '法人主管业务';
  238. COMMENT ON COLUMN cas_unit_info.company_phone IS '法人电话';
  239. COMMENT ON COLUMN cas_unit_info.company_team IS '法人社会任职情况';
  240. COMMENT ON COLUMN cas_unit_info.unit_remake IS '公司简介';
  241. COMMENT ON COLUMN cas_unit_info.technological_personnel IS '科技人员总数';
  242. COMMENT ON COLUMN cas_unit_info.technological_high IS '高级技术人员总数';
  243. COMMENT ON COLUMN cas_unit_info.technological_module IS '劳动模范人数';
  244. COMMENT ON COLUMN cas_unit_info.technological_other IS '行业标兵人员你总数';
  245. COMMENT ON COLUMN cas_unit_info.company_work IS '业务返回主要成果';
  246. COMMENT ON COLUMN cas_unit_info.technological_work_remake IS '科技工作简介';
  247. COMMENT ON COLUMN cas_unit_info.fax IS '传真';
  248. COMMENT ON COLUMN cas_unit_info.delete_flag IS '删除标记';
  249. COMMENT ON COLUMN cas_unit_info.aid IS '记录新增人员ID';
  250. COMMENT ON COLUMN cas_unit_info.atime IS '记录新增时间';
  251. COMMENT ON COLUMN cas_unit_info.mid IS '记录修改人员ID';
  252. COMMENT ON COLUMN cas_unit_info.mtime IS '记录修改时间';
  253. CREATE TABLE cas_work_record_info
  254. (
  255. id integer NOT NULL DEFAULT nextval('seq_cas_work_record_info'::regclass),
  256. user_id integer,
  257. unit character varying,
  258. work_type character varying,
  259. duty character varying,
  260. begin_time timestamp without time zone DEFAULT now(),
  261. end_time timestamp without time zone DEFAULT now(),
  262. remake character varying,
  263. img_id character varying,
  264. delete_flag integer,
  265. aid integer,
  266. atime timestamp without time zone NOT NULL DEFAULT now(),
  267. mid integer,
  268. mtime timestamp without time zone DEFAULT now(),
  269. CONSTRAINT pkey_cas_work_record_info PRIMARY KEY (id)
  270. )
  271. WITH (
  272. OIDS=FALSE
  273. );
  274. ALTER TABLE cas_work_record_info
  275. OWNER TO postgres;
  276. COMMENT ON TABLE cas_work_record_info
  277. IS '工作履历';
  278. COMMENT ON COLUMN cas_work_record_info.id IS 'pk';
  279. COMMENT ON COLUMN cas_work_record_info.user_id IS '用户id';
  280. COMMENT ON COLUMN cas_work_record_info.unit IS '工作单位';
  281. COMMENT ON COLUMN cas_work_record_info.work_type IS '从事工作';
  282. COMMENT ON COLUMN cas_work_record_info.duty IS '职务';
  283. COMMENT ON COLUMN cas_work_record_info.begin_time IS '开始时间';
  284. COMMENT ON COLUMN cas_work_record_info.end_time IS '结束时间';
  285. COMMENT ON COLUMN cas_work_record_info.remake IS '描述';
  286. COMMENT ON COLUMN cas_work_record_info.img_id IS '图片id';
  287. COMMENT ON COLUMN cas_unit_info.delete_flag IS '删除标记';
  288. COMMENT ON COLUMN cas_work_record_info.aid IS '记录新增人员ID';
  289. COMMENT ON COLUMN cas_work_record_info.atime IS '记录新增时间';
  290. COMMENT ON COLUMN cas_work_record_info.mid IS '记录修改人员ID';
  291. COMMENT ON COLUMN cas_work_record_info.mtime IS '记录修改时间';
  292. CREATE TABLE cas_case_info
  293. (
  294. id integer NOT NULL DEFAULT nextval('seq_cas_case_info'::regclass),
  295. user_id integer,
  296. name character varying,
  297. role_position character varying,
  298. reward character varying,
  299. begin_time timestamp without time zone DEFAULT now(),
  300. end_time timestamp without time zone DEFAULT now(),
  301. remake character varying,
  302. img_id character varying,
  303. delete_flag integer,
  304. aid integer,
  305. atime timestamp without time zone NOT NULL DEFAULT now(),
  306. mid integer,
  307. mtime timestamp without time zone DEFAULT now(),
  308. CONSTRAINT pkey_cas_case_info PRIMARY KEY (id)
  309. )
  310. WITH (
  311. OIDS=FALSE
  312. );
  313. ALTER TABLE cas_case_info
  314. OWNER TO postgres;
  315. COMMENT ON TABLE cas_case_info
  316. IS '工作业绩表';
  317. COMMENT ON COLUMN cas_case_info.id IS 'pk';
  318. COMMENT ON COLUMN cas_case_info.user_id IS '用户id';
  319. COMMENT ON COLUMN cas_case_info.name IS '项目课题名称';
  320. COMMENT ON COLUMN cas_case_info.role_position IS '担任角色';
  321. COMMENT ON COLUMN cas_case_info.reward IS '奖励';
  322. COMMENT ON COLUMN cas_case_info.begin_time IS '开始时间';
  323. COMMENT ON COLUMN cas_case_info.end_time IS '结束时间';
  324. COMMENT ON COLUMN cas_case_info.remake IS '描述';
  325. COMMENT ON COLUMN cas_case_info.img_id IS '图片id';
  326. COMMENT ON COLUMN cas_unit_info.delete_flag IS '删除标记';
  327. COMMENT ON COLUMN cas_case_info.aid IS '记录新增人员ID';
  328. COMMENT ON COLUMN cas_case_info.atime IS '记录新增时间';
  329. COMMENT ON COLUMN cas_case_info.mid IS '记录修改人员ID';
  330. COMMENT ON COLUMN cas_case_info.mtime IS '记录修改时间';
  331. CREATE TABLE cas_article_info
  332. (
  333. id integer NOT NULL DEFAULT nextval('seq_cas_article_info'::regclass),
  334. user_id integer,
  335. title character varying,
  336. publish_time timestamp without time zone DEFAULT now(),
  337. author character varying,
  338. publish_type character varying,
  339. ranking character varying,
  340. certificate character varying,
  341. award_time timestamp without time zone DEFAULT now(),
  342. img_id character varying,
  343. remake character varying,
  344. delete_flag integer,
  345. aid integer,
  346. atime timestamp without time zone NOT NULL DEFAULT now(),
  347. mid integer,
  348. mtime timestamp without time zone DEFAULT now(),
  349. CONSTRAINT pkey_cas_article_info PRIMARY KEY (id)
  350. )
  351. WITH (
  352. OIDS=FALSE
  353. );
  354. ALTER TABLE cas_article_info
  355. OWNER TO postgres;
  356. COMMENT ON TABLE cas_article_info
  357. IS '工作业绩表';
  358. COMMENT ON COLUMN cas_article_info.id IS 'pk';
  359. COMMENT ON COLUMN cas_article_info.user_id IS '用户id';
  360. COMMENT ON COLUMN cas_article_info.title IS '标题';
  361. COMMENT ON COLUMN cas_article_info.publish_time IS '出版时间';
  362. COMMENT ON COLUMN cas_article_info.author IS '作者';
  363. COMMENT ON COLUMN cas_article_info.publish_type IS '发表情况';
  364. COMMENT ON COLUMN cas_article_info.ranking IS '排名';
  365. COMMENT ON COLUMN cas_article_info.certificate IS '证书(获奖情况)';
  366. COMMENT ON COLUMN cas_article_info.award_time IS '获奖时间';
  367. COMMENT ON COLUMN cas_article_info.img_id IS '图片id';
  368. COMMENT ON COLUMN cas_article_info.remake IS '描述';
  369. COMMENT ON COLUMN cas_unit_info.delete_flag IS '删除标记';
  370. COMMENT ON COLUMN cas_article_info.aid IS '记录新增人员ID';
  371. COMMENT ON COLUMN cas_article_info.atime IS '记录新增时间';
  372. COMMENT ON COLUMN cas_article_info.mid IS '记录修改人员ID';
  373. COMMENT ON COLUMN cas_article_info.mtime IS '记录修改时间';