Guest User

Untitled

a guest
Mar 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. public partial class Users
  2. {
  3. [Column("UserId")]
  4. public int Id { get; set; }
  5. public string UserName { get; set; }
  6. public string Email { get; set; }
  7. public string Password { get; set; }
  8. public byte SubscriptionLevelId { get; set; }
  9.  
  10. public SubscriptionLevels SubscriptionLevels { get; set; }
  11. public ICollection<Competitions> Competitions { get; set; }
  12. public ICollection<Participants> Participants { get; set; }
  13. public ICollection<ResultStats> ResultStats { get; set; }
  14. }
  15.  
  16. public partial class SubscriptionLevels
  17. {
  18. [Column("SubscriptionLevelId")]
  19. public byte Id { get; set; }
  20. public string SubscriptionLevelName { get; set; }
  21. }
  22.  
  23. CREATE TABLE [dbo].[Users](
  24. [UserId] [int] IDENTITY(1,1) NOT NULL,
  25. [Email] [nvarchar](max) NULL,
  26. [Password] [nvarchar](max) NULL,
  27. [SubscriptionLevelId] [tinyint] NOT NULL,
  28. [SubscriptionLevelsId] [tinyint] NULL,
  29. [UserName] [nvarchar](max) NULL,
  30. CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
  31. (
  32. [UserId] ASC
  33. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  34. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  35. GO
  36.  
  37. ALTER TABLE [dbo].[Users] WITH CHECK ADD CONSTRAINT [FK_Users_SubscriptionLevels_SubscriptionLevelsId] FOREIGN KEY([SubscriptionLevelsId])
  38. REFERENCES [dbo].[SubscriptionLevels] ([SubscriptionLevelId])
  39. GO
  40.  
  41. ALTER TABLE [dbo].[Users] CHECK CONSTRAINT [FK_Users_SubscriptionLevels_SubscriptionLevelsId]
  42. GO
Add Comment
Please, Sign In to add comment