/*
 Navicat Premium Dump SQL

 Source Server         : localhost-sqlserver
 Source Server Type    : SQL Server
 Source Server Version : 11003000 (11.00.3000)
 Source Host           : localhost:1433
 Source Catalog        : LXZN_TEST_430_NEW
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 11003000 (11.00.3000)
 File Encoding         : 65001

 Date: 11/07/2025 10:51:28
*/


-- ----------------------------
-- Table structure for sys_position
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[sys_position]') AND type IN ('U'))
	DROP TABLE [dbo].[sys_position]
GO

CREATE TABLE [dbo].[sys_position] (
  [id] nvarchar(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [code] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [name] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [post_rank] nvarchar(2) COLLATE Chinese_PRC_CI_AS  NULL,
  [company_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_time] datetime2(7)  NULL,
  [update_by] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [update_time] datetime2(7)  NULL,
  [sys_org_code] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[sys_position] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'职务编码',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'code'
GO

EXEC sp_addextendedproperty
'MS_Description', N'职务名称',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'职级',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'post_rank'
GO

EXEC sp_addextendedproperty
'MS_Description', N'公司id',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'company_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建人',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'create_by'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'修改人',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'update_by'
GO

EXEC sp_addextendedproperty
'MS_Description', N'修改时间',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'update_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'组织机构编码',
'SCHEMA', N'dbo',
'TABLE', N'sys_position',
'COLUMN', N'sys_org_code'
GO


-- ----------------------------
-- Indexes structure for table sys_position
-- ----------------------------
CREATE UNIQUE NONCLUSTERED INDEX [uniq_code]
ON [dbo].[sys_position] (
  [code] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table sys_position
-- ----------------------------
ALTER TABLE [dbo].[sys_position] ADD CONSTRAINT [PK__sys_posi__3213E83F22016FDB] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

