-- 创建报销申请表
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[T_Reimbursement]') AND type in (N'U'))
BEGIN
    CREATE TABLE [dbo].[T_Reimbursement] (
        [F_ID] INT IDENTITY(1,1) PRIMARY KEY,
        [F_EmployeeCode] NVARCHAR(50) NOT NULL,
        [F_EmployeeName] NVARCHAR(50) NOT NULL,
        [F_Amount] DECIMAL(18,2) NOT NULL,
        [F_Remark] NVARCHAR(500) NULL,
        [F_ImageUrl] NVARCHAR(500) NULL,
        [F_Status] INT NOT NULL DEFAULT 0, -- 0:待审核, 1:已通过, 2:已拒绝
        [F_CreateTime] DATETIME NOT NULL DEFAULT GETDATE(),
        [F_AuditTime] DATETIME NULL,
        [F_AuditRemark] NVARCHAR(500) NULL
    );
    PRINT '表 T_Reimbursement 创建成功';
END
ELSE
BEGIN
    PRINT '表 T_Reimbursement 已存在';
END
