- Table "dbo"."Companies" {
- "Id" INT [not null, increment]
- "Name" NVARCHAR(200) [not null]
- "PostalCode" CHAR(5) [not null]
- "AddressDetails" NVARCHAR(300) [not null]
- "Phone" VARCHAR(30) [not null]
- "Email" VARCHAR(100) [not null]
- "StatusId" TINYINT [not null]
- "RegisterDate" SMALLDATETIME [not null]
- "TaxNumber" VARCHAR(11) [not null]
- "Web" NVARCHAR(100) [not null]
- Indexes {
- Id [pk]
- }
- }
- Table "dbo"."Foods" {
- "Id" INT [not null, increment]
- "Name" NVARCHAR(100) [not null]
- "CategoryId" INT [not null]
- "Price" REAL [not null]
- "DiscountPrice" REAL [not null]
- "Description" NVARCHAR(300)
- "StatusID" TINYINT [not null]
- Indexes {
- Id [pk]
- }
- }
- Table "dbo"."Restaurants" {
- "Id" INT [not null, increment]
- "Name" NVARCHAR(100) [not null]
- "CompanyId" INT [not null]
- "StatusId" TINYINT [not null]
- "Phone" VARCHAR(30) [not null]
- "PostalCode" CHAR(5) [not null]
- "AddressDetails" NVARCHAR(300) [not null]
- "RegisterDate" SMALLDATETIME [not null]
- Indexes {
- Id [pk]
- }
- }
- Table "dbo"."RestaurantsUsers" {
- "RestaurantId" INT [not null]
- "UserId" INT [not null]
- Indexes {
- (RestaurantId, UserId) [pk]
- }
- }
- Table "dbo"."Statuses" {
- "Id" TINYINT [not null]
- "Description" NVARCHAR(10) [not null]
- Indexes {
- Id [pk]
- }
- }
- Table "dbo"."Users" {
- "Id" INT [not null, increment]
- "UserName" NVARCHAR(100) [not null]
- "PassWord" NVARCHAR(128) [not null]
- "Name" NVARCHAR(100) [not null]
- "Email" VARCHAR(100) [not null]
- "Phone" VARCHAR(30) [not null]
- "RegisterDate" SMALLDATETIME [not null]
- "StatusId" TINYINT [not null]
- "CompanyId" INT [not null]
- Indexes {
- Id [pk]
- UserName [unique, name: "Index_Users_1"]
- }
- }
- Table "dbo"."Categories" {
- "Id" INT [not null, increment]
- "Name" NVARCHAR(100) [not null]
- "RestaurantId" INT [not null]
- "StatusId" TINYINT [not null]
- Indexes {
- Id [pk]
- }
- }
- Ref "FK_Companies_Statuses":"dbo"."Statuses"."Id" < "dbo"."Companies"."StatusId"
- Ref "FK_Foods_Categories":"dbo"."Categories"."Id" < "dbo"."Foods"."CategoryId"
- Ref "FK_Foods_Statuses":"dbo"."Statuses"."Id" < "dbo"."Foods"."StatusID"
- Ref "FK_Restaurants_Companies":"dbo"."Companies"."Id" < "dbo"."Restaurants"."CompanyId"
- Ref "FK_Restaurants_Statuses":"dbo"."Statuses"."Id" < "dbo"."Restaurants"."StatusId"
- Ref "FK_RestaurantsUsers_Restaurants":"dbo"."Restaurants"."Id" < "dbo"."RestaurantsUsers"."RestaurantId"
- Ref "FK_RestaurantsUsers_Users":"dbo"."Users"."Id" < "dbo"."RestaurantsUsers"."UserId"
- Ref "FK_Users_Companies":"dbo"."Companies"."Id" < "dbo"."Users"."Id"
- Ref "FK_Users_Statuses":"dbo"."Statuses"."Id" < "dbo"."Users"."StatusId"
- Ref "FK_Categories_Restaurants":"dbo"."Restaurants"."Id" < "dbo"."Categories"."RestaurantId"
- Ref "FK_Categories_Statuses":"dbo"."Statuses"."Id" < "dbo"."Categories"."StatusId"