protected Decklist()
 {
     MainDeck           = new JoinCollectionFacade <Card, Decklist, CardInMainDeckDecklistJoin>(this, CardsInMainDeckJoin);
     ExtraDeck          = new JoinCollectionFacade <Card, Decklist, CardInExtraDeckDecklistJoin>(this, CardsInExtraDeckJoin);
     SideDeck           = new JoinCollectionFacade <Card, Decklist, CardInSideDeckDecklistJoin>(this, CardsInSideDeckJoin);
     PlayableOnBanlists = new JoinCollectionFacade <Banlist, Decklist, DecklistsBanlistsJoin>(this, DecklistPlayableOnBanlistsJoin);
 }
Exemple #2
0
 /// <summary>
 /// 角色
 /// </summary>
 public Role()
 {
     Permission = new JoinCollectionFacade <Permission, Role, PermissionRole>(this, PermissionRole);
     Account    = new JoinCollectionFacade <Account, Role, AccountRole>(this, AccountRole);
     Department =
         new JoinCollectionFacade <Department, Role, DepartmentRole>(this, DepartmentRole);
 }
Exemple #3
0
        public Post()
        {
            CreatedAt = DateTime.Now;

            Year  = DateTime.Now.Year;
            Month = DateTime.Now.Month;

            Categories = new JoinCollectionFacade <Category, Post, PostCategory>(this, PostCategories);
        }
 /// <summary>
 /// Initialize banlist.
 /// </summary>
 /// <param name="id">Banlist identifier.</param>
 /// <param name="name">Valid name should look like: "YYYY.MM Format" for example "2010 TCG". </param>
 /// <param name="banlistNumberInLfList">Order number in lflist.</param>
 protected Banlist(int id, string name, int banlistNumberInLfList)
 {
     Id   = id;
     Name = name;
     BanlistNumberInLfList = banlistNumberInLfList;
     ForbiddenCards        = new JoinCollectionFacade <Card, Banlist, ForbiddenCardBanlistJoin>(this, ForbiddenCardsJoin);
     LimitedCards          = new JoinCollectionFacade <Card, Banlist, LimitedCardBanlistJoin>(this, LimitedCardsJoin);
     SemiLimitedCards      = new JoinCollectionFacade <Card, Banlist, SemiLimitedCardBanlistJoin>(this, SemiLimitedCardsJoin);
     AllowedDecklists      = new JoinCollectionFacade <Decklist, Banlist, DecklistsBanlistsJoin>(this, AllowedDecklistsBanlistsJoin);
 }
 /// <summary>
 /// Initialize banlist.
 /// </summary>
 /// <param name="name">Valid name should look like: "YYYY.MM Format" for example "2010.11 TCG". </param>
 /// /// <param name="banlistNumberInLfList">Order number in lflist.</param>
 public Banlist(string name, int banlistNumberInLfList)
 {
     _validateName(name);
     Name = name;
     BanlistNumberInLfList = banlistNumberInLfList;
     ReleaseDate           = GetReleaseDateFromName();
     ForbiddenCards        = new JoinCollectionFacade <Card, Banlist, ForbiddenCardBanlistJoin>(this, ForbiddenCardsJoin);
     LimitedCards          = new JoinCollectionFacade <Card, Banlist, LimitedCardBanlistJoin>(this, LimitedCardsJoin);
     SemiLimitedCards      = new JoinCollectionFacade <Card, Banlist, SemiLimitedCardBanlistJoin>(this, SemiLimitedCardsJoin);
     AllowedDecklists      = new JoinCollectionFacade <Decklist, Banlist, DecklistsBanlistsJoin>(this, AllowedDecklistsBanlistsJoin);
 }
        public Decklist(IEnumerable <Card> mainDeck, IEnumerable <Card> extraDeck, IEnumerable <Card> sideDeck)
        {
            MainDeck           = new JoinCollectionFacade <Card, Decklist, CardInMainDeckDecklistJoin>(this, CardsInMainDeckJoin);
            ExtraDeck          = new JoinCollectionFacade <Card, Decklist, CardInExtraDeckDecklistJoin>(this, CardsInExtraDeckJoin);
            SideDeck           = new JoinCollectionFacade <Card, Decklist, CardInSideDeckDecklistJoin>(this, CardsInSideDeckJoin);
            PlayableOnBanlists = new JoinCollectionFacade <Banlist, Decklist, DecklistsBanlistsJoin>(this, DecklistPlayableOnBanlistsJoin);

            foreach (var card in mainDeck)
            {
                MainDeck.Add(card);
            }

            foreach (var card in extraDeck)
            {
                ExtraDeck.Add(card);
            }

            foreach (var card in sideDeck)
            {
                SideDeck.Add(card);
            }
        }
        /// <summary>
        /// Adds Basic Card Elements. Remember to add archetype after creation.
        /// </summary>
        /// <param name="passCode">YuGiOh Card Passcode.</param>
        /// <param name="name">Card name.</param>
        /// <param name="description">Card description/effect/flavor text.</param>
        /// <param name="type">
        ///     For example: normal monster, trap card, magic card.
        ///     https://db.ygoprodeck.com/api-guide/
        /// </param>
        /// <param name="race">
        ///     For example:
        ///     <para>1) For monster: aqua, machine warrior</para>
        ///     <para>2) For spell: normal, field, quick-spell</para>
        ///     <para>3) For trap: normal, continuous, counter</para>
        ///     https://db.ygoprodeck.com/api-guide/
        /// </param>
        /// <param name="imageUrl">Link to the image of the card.</param>
        /// <param name="smallImageUrl">Link to the small image of the card.</param>
        protected Card(
            int passCode,
            string name,
            string description,
            string type,
            string race,
            string imageUrl,
            string smallImageUrl)
        {
            PassCode      = passCode;
            Name          = name;
            Description   = description;
            Type          = type;
            Race          = race;
            ImageUrl      = imageUrl;
            SmallImageUrl = smallImageUrl;
            BanlistsWhereThisCardIsForbidden   = new JoinCollectionFacade <Banlist, Card, ForbiddenCardBanlistJoin>(this, ForbiddenCardsJoin);
            BanlistsWhereThisCardIsLimited     = new JoinCollectionFacade <Banlist, Card, LimitedCardBanlistJoin>(this, LimitedCardsJoin);
            BanlistsWhereThisCardIsSemiLimited = new JoinCollectionFacade <Banlist, Card, SemiLimitedCardBanlistJoin>(this, SemiLimitedCardsJoin);

            DecksWhereThisCardIsInMainDeck  = new JoinCollectionFacade <Decklist, Card, CardInMainDeckDecklistJoin>(this, MainDeckJoin);
            DecksWhereThisCardIsInExtraDeck = new JoinCollectionFacade <Decklist, Card, CardInExtraDeckDecklistJoin>(this, ExtraDeckJoin);
            DecksWhereThisCardIsInSideDeck  = new JoinCollectionFacade <Decklist, Card, CardInSideDeckDecklistJoin>(this, SideDeckJoin);
        }
Exemple #8
0
 /// <summary>
 /// 部门
 /// </summary>
 public Department()
 {
     Role = new JoinCollectionFacade <Role, Department, DepartmentRole>(this, DepartmentRole);
 }
Exemple #9
0
 public Post()
 {
     IsPage = false;
     Tags   = new JoinCollectionFacade <Tag, Post, PostTag>(this, PostsTags);
 }
Exemple #10
0
 public ManyToManyEntityB()
 {
     ManyToManyEntityABMappings = new List <ManyToManyEntityABMapping>();
     ManyToManyEntityAs         = new JoinCollectionFacade <ManyToManyEntityA, ManyToManyEntityB, ManyToManyEntityABMapping>(this, ManyToManyEntityABMappings);
 }
Exemple #11
0
 public Tag()
 {
     Posts = new JoinCollectionFacade <Post, Tag, PostTag>(this, PostsTags);
 }
Exemple #12
0
        public Contract()
        {
            Departments = new JoinCollectionFacade <Department, Contract, DepartmentContract>(this, DepartmentContracts);

            Partners = new JoinCollectionFacade <Partner, Contract, PartnerContract>(this, PartnerContracts);
        }
Exemple #13
0
        // public Uzytkownik()
        // {
        //     UzytkownikGrupy = new HashSet<UzytkownikGrupa>();
        //     Zamowienia = new HashSet<Zamowienie>();
        //     UpodobaniaUzytkownika = new HashSet<UpodobanieUzytkownika>();
        // }

        public Uzytkownik()
        {
            Produkty = new JoinCollectionFacade <Produkt, Uzytkownik, UpodobanieUzytkownika>(this, UpodobaniaUzytkownika);
            Grupy    = new JoinCollectionFacade <Grupa, Uzytkownik, UzytkownikGrupa>(this, UzytkownikGrupy);
        }
Exemple #14
0
 /// <summary>
 /// 账户模型
 /// </summary>
 public Account()
 {
     Role = new JoinCollectionFacade <Role, Account, AccountRole>(this, AccountRole);
     Post = new JoinCollectionFacade <Post, Account, AccountPost>(this, AccountPost);
 }
Exemple #15
0
 /// <summary>
 /// 权限
 /// </summary>
 public Permission()
 {
     Role = new JoinCollectionFacade <Role, Permission, PermissionRole>(this, PermissionRole);
 }
Exemple #16
0
        public AppUser()
        {
            CreatedAt = DateTime.Now;

            Permissions = new JoinCollectionFacade <Permission, AppUser, UserPermission>(this, UserPermissions);
        }
Exemple #17
0
        //public Produkt()
        //{
        //    StanLodowki = new HashSet<StanLodowki>();
        //    ZamowienieProdukty = new HashSet<ZamowienieProdukt>();
        //    UpodobanieUzytkownikow = new HashSet<UpodobanieUzytkownika>();
        //}

        public Produkt()
        {
            Zamowienia  = new JoinCollectionFacade <Zamowienie, Produkt, ZamowienieProdukt>(this, ZamowienieProdukty);
            Uzytkownicy = new JoinCollectionFacade <Uzytkownik, Produkt, UpodobanieUzytkownika>(this, UpodobanieUzytkownikow);
            Lodowki     = new JoinCollectionFacade <Lodowka, Produkt, StanLodowki>(this, StanLodowki);
        }
Exemple #18
0
 public Person()
 {
     NeuralNetworks =
         new JoinCollectionFacade <NeuralNetwork, Person, NeuralNetworkPerson>(this, NeuralNetworkPeople);
 }
Exemple #19
0
 public NeuralNetwork()
 {
     People = new JoinCollectionFacade <Person, NeuralNetwork, NeuralNetworkPerson>(this, NeuralNetworkPeople);
 }
Exemple #20
0
 /// <summary>
 /// 岗位
 /// </summary>
 public Post()
 {
     Account = new JoinCollectionFacade <Account, Post, AccountPost>(this, AccountPost);
 }