Files
17168ERP/data/SQL/guadan_script_only_data.sql

63 lines
30 KiB
Transact-SQL
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
USE [17168erp_t]
GO
INSERT [dbo].[RegionType] ([Code], [Name], [IsActive], [CreateAt], [IsDeleted], [Uuid]) VALUES (N'room', N'客房', 1, NULL, 0, N'a0b583e1-4189-47dd-a836-46217577ebaa')
INSERT [dbo].[RegionType] ([Code], [Name], [IsActive], [CreateAt], [IsDeleted], [Uuid]) VALUES (N'floor', N'樓層', 1, NULL, 0, N'cf12fc3c-0e37-4032-b3b8-dea728666531')
GO
INSERT [dbo].[Region] ([Name], [Description], [SortOrder], [CreatedBy], [CreatedAt], [UpdatedAt], [IsActive], [RoomCount], [IsDeleted], [Uuid], [ParentUuid], [RegionTypeUuid], [Gender]) VALUES (N'三樓男眾寮房', N'這是三樓的男眾寮房區域,裡面有多個房間可供法師和蓮友掛單', 0, NULL, NULL, NULL, 1, 10, 0, N'3eb33475-0813-441d-a8d9-1c01a11aa6c6', N'455aaff7-86ba-4bc2-a5d3-af1170fb404d', NULL, NULL)
INSERT [dbo].[Region] ([Name], [Description], [SortOrder], [CreatedBy], [CreatedAt], [UpdatedAt], [IsActive], [RoomCount], [IsDeleted], [Uuid], [ParentUuid], [RegionTypeUuid], [Gender]) VALUES (N'十樓', N'這是女眾寮房區域', 0, NULL, NULL, CAST(N'2025-08-26T15:28:38.860' AS DateTime), 1, NULL, 0, N'629251a3-71bd-4ad9-84f7-6cc1df1f7085', N'1cc29853-069d-4111-8dbe-fbd7a45e085a', NULL, NULL)
INSERT [dbo].[Region] ([Name], [Description], [SortOrder], [CreatedBy], [CreatedAt], [UpdatedAt], [IsActive], [RoomCount], [IsDeleted], [Uuid], [ParentUuid], [RegionTypeUuid], [Gender]) VALUES (N'三樓', N'', -1, NULL, NULL, CAST(N'2025-08-26T15:29:04.917' AS DateTime), 1, NULL, 0, N'455aaff7-86ba-4bc2-a5d3-af1170fb404d', N'1cc29853-069d-4111-8dbe-fbd7a45e085a', NULL, NULL)
INSERT [dbo].[Region] ([Name], [Description], [SortOrder], [CreatedBy], [CreatedAt], [UpdatedAt], [IsActive], [RoomCount], [IsDeleted], [Uuid], [ParentUuid], [RegionTypeUuid], [Gender]) VALUES (N'十樓女眾寮房', N'', 0, NULL, NULL, CAST(N'2025-08-25T17:52:00.050' AS DateTime), 1, 5, 0, N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6', N'629251a3-71bd-4ad9-84f7-6cc1df1f7085', NULL, NULL)
INSERT [dbo].[Region] ([Name], [Description], [SortOrder], [CreatedBy], [CreatedAt], [UpdatedAt], [IsActive], [RoomCount], [IsDeleted], [Uuid], [ParentUuid], [RegionTypeUuid], [Gender]) VALUES (N'鄉根大樓', N'', 0, NULL, NULL, NULL, 1, NULL, 0, N'1cc29853-069d-4111-8dbe-fbd7a45e085a', NULL, NULL, NULL)
GO
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房1', 1, 6, 1, NULL, CAST(N'2025-08-25T14:21:00.650' AS DateTime), 0, N'2eab6c78-e3ba-4447-8520-1e07a6008c93', N'3eb33475-0813-441d-a8d9-1c01a11aa6c6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房5', 0, 5, 1, NULL, NULL, 0, N'a04d3043-94fc-4ff8-bc4d-6f130aa3e65e', N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房一', 0, 10, 1, NULL, NULL, 0, N'1e6f660d-fdc3-458f-9e17-8de021cf812a', N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房2', 0, 2, 1, NULL, CAST(N'2025-08-25T14:42:27.833' AS DateTime), 0, N'ba7d3c94-c187-4309-b94f-994aa381ee93', N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房3', 0, 5, 1, NULL, CAST(N'2025-08-25T14:43:15.930' AS DateTime), 0, N'0a636a76-2ac7-4485-924c-b3a60f064581', N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房4', 0, 10, 1, NULL, NULL, 0, N'7020e1a5-5d0c-49b0-8aa8-d4291bce5c50', N'feee62c0-6dbd-43c3-8644-d29d6f6cd7f6')
INSERT [dbo].[Room] ([Name], [Gender], [BedCount], [IsActive], [CreatedAt], [UpdatedAt], [IsDeleted], [Uuid], [RegionUuid]) VALUES (N'客房1', 1, 5, 1, NULL, CAST(N'2025-08-25T15:38:04.027' AS DateTime), 0, N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'3eb33475-0813-441d-a8d9-1c01a11aa6c6')
GO
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'101', N'空床', N'床位可分配', 1, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'102', N'占用中', N'床位已有人使用', 1, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'103', N'維修停用', N'床位維修或不可使用', 1, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'301', N'空房', N'房間所有床位皆為空', 3, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'302', N'部分入住', N'房間有人,但仍有空床', 3, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'303', N'已滿', N'房間所有床位皆已入住', 3, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'304', N'維修停用', N'房間維修或不可使用', 3, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'401', N'預訂成功', N'默認就是預訂成功狀態', 4, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'402', N'已入住', N'已辦理入住', 4, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'403', N'已退房', N'', 4, 0)
INSERT [dbo].[RegionRoomBedStatus] ([Code], [Name], [Description], [Category], [IsDeleted]) VALUES (N'404', N'已取消', N'取消後的狀態,不是取消的動作', 4, 0)
GO
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位1', 1, 1, 0, N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'102')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位2', 1, 1, 0, N'94c56fd5-41e2-482a-a356-2afc081cc433', N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位1', 1, 1, 0, N'4c6d5873-ded3-4340-92f2-2c132f06601c', N'2eab6c78-e3ba-4447-8520-1e07a6008c93', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位3', 1, 1, 0, N'd98d17b5-200e-4f6e-af29-404cfca1a4eb', N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位1', 1, 0, 0, N'0be1d3d0-b92b-4c90-b0fc-5e72f275557a', N'ba7d3c94-c187-4309-b94f-994aa381ee93', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位4', 1, 1, 0, N'645f243d-8f0e-4650-9436-6cb2a39e30f1', N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位2', 1, 0, 0, N'0a9e967e-1491-44bb-adca-c5e967bf2116', N'ba7d3c94-c187-4309-b94f-994aa381ee93', N'101')
INSERT [dbo].[RegionRoomBed] ([Name], [IsActive], [Gender], [IsDeleted], [Uuid], [RoomUuid], [StatusCode]) VALUES (N'床位1', 1, 0, 0, N'22fce2a7-5dcb-4d02-be64-d5538297c84a', N'0a636a76-2ac7-4485-924c-b3a60f064581', N'101')
GO
INSERT [dbo].[GuaDanOrderGuest] ([GuaDanOrderNo], [FollowerNum], [IsDeleted], [Uuid], [RoomUuid], [BedUuid], [CheckInAt], [CheckOutAt], [StatusCode]) VALUES (N'GD20250911-1E1C', 17594, 0, N'1fc04192-ccaa-4614-8055-5196d6bb3c70', N'2eab6c78-e3ba-4447-8520-1e07a6008c93', N'4c6d5873-ded3-4340-92f2-2c132f06601c', CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), N'404')
INSERT [dbo].[GuaDanOrderGuest] ([GuaDanOrderNo], [FollowerNum], [IsDeleted], [Uuid], [RoomUuid], [BedUuid], [CheckInAt], [CheckOutAt], [StatusCode]) VALUES (N'GD20250911-C529', 17666, 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075', N'9ed0c9a3-a141-40b4-8b72-e3cabe7bd7cf', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', CAST(N'2025-09-12' AS Date), CAST(N'2025-09-19' AS Date), N'402')
INSERT [dbo].[GuaDanOrderGuest] ([GuaDanOrderNo], [FollowerNum], [IsDeleted], [Uuid], [RoomUuid], [BedUuid], [CheckInAt], [CheckOutAt], [StatusCode]) VALUES (N'GD20250911-C529', 17594, 0, N'fe878aa6-ea8f-4cf5-b61c-86c6c0520e4a', N'2eab6c78-e3ba-4447-8520-1e07a6008c93', N'4c6d5873-ded3-4340-92f2-2c132f06601c', CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), N'403')
INSERT [dbo].[GuaDanOrderGuest] ([GuaDanOrderNo], [FollowerNum], [IsDeleted], [Uuid], [RoomUuid], [BedUuid], [CheckInAt], [CheckOutAt], [StatusCode]) VALUES (N'GD20250911-9D05', 17594, 0, N'0240d008-eb7c-4b20-bf55-f1032e1198e0', N'2eab6c78-e3ba-4447-8520-1e07a6008c93', N'4c6d5873-ded3-4340-92f2-2c132f06601c', CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), N'404')
GO
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8328774' AS DateTime2), 0, N'321ffa19-3a39-4447-a9ed-2288d9b3e5fa', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-16' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'掛單', N'床位掛單', NULL, CAST(N'2025-09-11T14:18:35.1288235' AS DateTime2), 0, N'8b5c4593-77bb-4459-9a7f-3d0a1c0a1c1a', N'4c6d5873-ded3-4340-92f2-2c132f06601c', N'GD20250911-C529', CAST(N'2025-09-11' AS Date), 0, N'fe878aa6-ea8f-4cf5-b61c-86c6c0520e4a')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'掛單', N'床位掛單', NULL, CAST(N'2025-09-11T16:28:35.6590989' AS DateTime2), 0, N'c45ab58e-69c9-44bf-b8db-5939f6ec01ed', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-12' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8328774' AS DateTime2), 0, N'f10239fb-a095-4b2f-8330-8b09d88992ab', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-17' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'掛單', N'床位掛單', NULL, CAST(N'2025-09-11T14:01:01.7253383' AS DateTime2), 0, N'6c7dff5e-f5b3-4975-9911-a44ea8ec728e', N'4c6d5873-ded3-4340-92f2-2c132f06601c', N'GD20250911-1E1C', CAST(N'2025-09-11' AS Date), 1, N'1fc04192-ccaa-4614-8055-5196d6bb3c70')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8328774' AS DateTime2), 0, N'18b35aa7-7470-41ee-92b5-a566f38b29bf', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-15' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'掛單', N'床位掛單', NULL, CAST(N'2025-09-11T14:07:00.7052210' AS DateTime2), 0, N'2086e8ea-628f-43af-a83a-adbf991c8722', N'4c6d5873-ded3-4340-92f2-2c132f06601c', N'GD20250911-9D05', CAST(N'2025-09-11' AS Date), 1, N'0240d008-eb7c-4b20-bf55-f1032e1198e0')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8328774' AS DateTime2), 0, N'5316b3d1-1d67-439e-b898-c8f798366a96', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-14' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8328774' AS DateTime2), 0, N'e67435d0-5658-4f26-8101-cdb9f7064b6b', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-18' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
INSERT [dbo].[RegionAndRoomAndBedSchedule] ([UseType], [Title], [Description], [CreatedBy], [CreatedAt], [IsDeleted], [Uuid], [TargetUuid], [GuaDanOrderNo], [ScheduleDate], [IsCancel], [GuaDanOrderGuestUuid]) VALUES (30, N'续住挂单', N'续住挂单', NULL, CAST(N'2025-09-12T03:00:07.8154678' AS DateTime2), 0, N'd290bee2-44d6-4fd5-953b-e707e5aba262', N'9a34de64-0d1d-4e1d-b240-1e63dd95a98d', N'GD20250911-C529', CAST(N'2025-09-13' AS Date), 0, N'80bae3f4-b068-4e31-a3f9-7c365648f075')
GO
INSERT [dbo].[GuaDanOrder] ([StartDate], [EndDate], [CreateUser], [CreatedAt], [UpdatedAt], [Notes], [GuaDanOrderNo], [BookerFollowerNum], [BookerName], [BookerPhone], [IsDeleted], [Uuid], [ActivityNum], [IsCancel]) VALUES (CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), NULL, CAST(N'2025-09-11T14:00:43.6670293' AS DateTime2), CAST(N'2025-09-11T14:00:43.6670293' AS DateTime2), NULL, N'GD20250911-1E1C', NULL, N'同仁堂', NULL, 0, N'ce18bb9e-8170-400a-b37b-2f6070db3032', NULL, 1)
INSERT [dbo].[GuaDanOrder] ([StartDate], [EndDate], [CreateUser], [CreatedAt], [UpdatedAt], [Notes], [GuaDanOrderNo], [BookerFollowerNum], [BookerName], [BookerPhone], [IsDeleted], [Uuid], [ActivityNum], [IsCancel]) VALUES (CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), NULL, CAST(N'2025-09-11T14:18:20.3342626' AS DateTime2), CAST(N'2025-09-11T14:18:20.3342626' AS DateTime2), NULL, N'GD20250911-C529', NULL, N'发多少', NULL, 0, N'def91ee9-7da8-4c62-883f-747a565a7959', NULL, 0)
INSERT [dbo].[GuaDanOrder] ([StartDate], [EndDate], [CreateUser], [CreatedAt], [UpdatedAt], [Notes], [GuaDanOrderNo], [BookerFollowerNum], [BookerName], [BookerPhone], [IsDeleted], [Uuid], [ActivityNum], [IsCancel]) VALUES (CAST(N'2025-09-11' AS Date), CAST(N'2025-09-12' AS Date), NULL, CAST(N'2025-09-11T14:06:47.4391998' AS DateTime2), CAST(N'2025-09-11T14:06:47.4391998' AS DateTime2), NULL, N'GD20250911-9D05', NULL, N'', NULL, 0, N'd8f8c3da-08e7-4549-be9b-fad3e678768e', NULL, 1)
GO
INSERT [dbo].[GuadanTimeSetting] ([Id], [EarliestCheckIn], [LatestCheckOut], [IsActive], [CreatedAt], [UpdatedAt]) VALUES (N'64c7c090-931b-4a48-b0c5-9ff409b64767', N'12:00', N'11:00', 1, CAST(N'2025-08-29T18:10:15.920' AS DateTime), CAST(N'2025-08-29T18:13:21.997' AS DateTime))
GO