@armoyu/core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/api/ApiClient.d.ts +49 -11
  2. package/dist/api/ApiClient.js +137 -33
  3. package/dist/api/ArmoyuApi.d.ts +38 -0
  4. package/dist/api/ArmoyuApi.js +66 -0
  5. package/dist/armoyu-core.bundle.js +1 -0
  6. package/dist/index.d.ts +11 -1
  7. package/dist/index.js +9 -2
  8. package/dist/models/auth/User.js +17 -22
  9. package/dist/models/core/Rule.d.ts +23 -0
  10. package/dist/models/core/Rule.js +39 -0
  11. package/dist/models/index.d.ts +1 -0
  12. package/dist/models/index.js +1 -0
  13. package/dist/models/social/Post.js +15 -15
  14. package/dist/services/AuthService.d.ts +11 -10
  15. package/dist/services/AuthService.js +56 -27
  16. package/dist/services/BaseService.d.ts +10 -0
  17. package/dist/services/BaseService.js +27 -0
  18. package/dist/services/BlogService.d.ts +16 -0
  19. package/dist/services/BlogService.js +54 -0
  20. package/dist/services/BotService.d.ts +28 -0
  21. package/dist/services/BotService.js +92 -0
  22. package/dist/services/ForumService.d.ts +19 -0
  23. package/dist/services/ForumService.js +64 -0
  24. package/dist/services/RuleService.d.ts +28 -0
  25. package/dist/services/RuleService.js +90 -0
  26. package/dist/services/ShopService.d.ts +20 -0
  27. package/dist/services/ShopService.js +53 -0
  28. package/dist/services/SocialService.d.ts +8 -7
  29. package/dist/services/SocialService.js +26 -21
  30. package/dist/services/SupportService.d.ts +16 -0
  31. package/dist/services/SupportService.js +54 -0
  32. package/dist/services/UserService.d.ts +12 -7
  33. package/dist/services/UserService.js +35 -18
  34. package/package.json +27 -21
  35. package/src/api/ApiClient.ts +0 -57
  36. package/src/index.ts +0 -24
  37. package/src/models/auth/Role.ts +0 -26
  38. package/src/models/auth/Session.ts +0 -50
  39. package/src/models/auth/User.ts +0 -111
  40. package/src/models/community/Classroom.ts +0 -34
  41. package/src/models/community/Event.ts +0 -32
  42. package/src/models/community/Faculty.ts +0 -30
  43. package/src/models/community/Forum.ts +0 -42
  44. package/src/models/community/Giveaway.ts +0 -39
  45. package/src/models/community/Group.ts +0 -78
  46. package/src/models/community/School.ts +0 -51
  47. package/src/models/community/SchoolTeam.ts +0 -49
  48. package/src/models/community/Station.ts +0 -145
  49. package/src/models/community/Survey.ts +0 -53
  50. package/src/models/community/SurveyAnswer.ts +0 -26
  51. package/src/models/community/Team.ts +0 -24
  52. package/src/models/community/Workplace.ts +0 -32
  53. package/src/models/content/Game.ts +0 -39
  54. package/src/models/content/Media.ts +0 -30
  55. package/src/models/content/Mod.ts +0 -38
  56. package/src/models/content/News.ts +0 -43
  57. package/src/models/content/Project.ts +0 -49
  58. package/src/models/core/PlatformStats.ts +0 -74
  59. package/src/models/core/SystemSettings.ts +0 -59
  60. package/src/models/index.ts +0 -37
  61. package/src/models/shop/CartItem.ts +0 -31
  62. package/src/models/shop/Order.ts +0 -48
  63. package/src/models/shop/Product.ts +0 -61
  64. package/src/models/social/Chat.ts +0 -47
  65. package/src/models/social/ChatMessage.ts +0 -30
  66. package/src/models/social/Comment.ts +0 -38
  67. package/src/models/social/Group.ts +0 -63
  68. package/src/models/social/Leaderboard.ts +0 -57
  69. package/src/models/social/Note.ts +0 -28
  70. package/src/models/social/Notification.ts +0 -99
  71. package/src/models/social/NotificationSender.ts +0 -36
  72. package/src/models/social/Post.ts +0 -75
  73. package/src/models/social/Story.ts +0 -30
  74. package/src/models/social/SupportTicket.ts +0 -38
  75. package/src/models/store/StoreItem.ts +0 -32
  76. package/src/services/AuthService.ts +0 -91
  77. package/src/services/SocialService.ts +0 -92
  78. package/src/services/SocketService.ts +0 -112
  79. package/src/services/UserService.ts +0 -69
  80. package/src/types/stats.ts +0 -17
  81. package/tsconfig.json +0 -16
@@ -1,145 +0,0 @@
1
- import { User } from '../auth/User';
2
-
3
- export type StationType = 'YEMEK' | 'INTERNET_KAFE' | 'HALI_SAHA' | 'SPOR_KOMPLEKSI';
4
-
5
- /**
6
- * Represents a menu item or a product in a station.
7
- */
8
- export class StationProduct {
9
- id: string = '';
10
- name: string = '';
11
- price: number = 0;
12
- category: string = '';
13
- image?: string;
14
- isDeal?: boolean;
15
- discountRate?: string;
16
-
17
- constructor(data: Partial<StationProduct>) {
18
- Object.assign(this, data);
19
- }
20
-
21
- static fromJSON(json: Record<string, any>): StationProduct {
22
- return new StationProduct({
23
- id: json.id || '',
24
- name: json.name || '',
25
- price: json.price || 0,
26
- category: json.category || '',
27
- image: json.image,
28
- isDeal: json.isDeal,
29
- discountRate: json.discountRate,
30
- });
31
- }
32
- }
33
-
34
- /**
35
- * Represents detailed hardware/equipment in a workstation setup.
36
- */
37
- export class WorkstationEquipment {
38
- id: string = '';
39
- name: string = 'Standart Masa'; // e.g., "VIP Oda #1"
40
- cpu: string = '';
41
- gpu: string = '';
42
- ram: string = '';
43
- monitor: string = '';
44
- keyboard: string = '';
45
- mouse: string = '';
46
- isAvailable?: boolean = true;
47
-
48
- constructor(data: Partial<WorkstationEquipment>) {
49
- Object.assign(this, data);
50
- }
51
-
52
- static fromJSON(json: Record<string, any>): WorkstationEquipment {
53
- return new WorkstationEquipment({
54
- id: json.id || '',
55
- name: json.name || '',
56
- cpu: json.cpu || '',
57
- gpu: json.gpu || '',
58
- ram: json.ram || '',
59
- monitor: json.monitor || '',
60
- keyboard: json.keyboard || '',
61
- mouse: json.mouse || '',
62
- isAvailable: json.isAvailable ?? true,
63
- });
64
- }
65
- }
66
-
67
- export interface StationPricing {
68
- label: string;
69
- price: number;
70
- unit: string; // 'saat', 'gün', 'seans' vb.
71
- }
72
-
73
- export class StationCoupon {
74
- code: string = '';
75
- discount: string = '';
76
- expiryDate: string = '';
77
- description: string = '';
78
-
79
- constructor(data: Partial<StationCoupon>) {
80
- Object.assign(this, data);
81
- }
82
-
83
- static fromJSON(json: Record<string, any>): StationCoupon {
84
- return new StationCoupon({
85
- code: json.code || '',
86
- discount: json.discount || '',
87
- expiryDate: json.expiryDate || '',
88
- description: json.description || '',
89
- });
90
- }
91
- }
92
-
93
- /**
94
- * Represents a Station (İstasyon) in the aramizdakioyuncu.com platform.
95
- */
96
- export class Station {
97
- id: string = '';
98
- name: string = '';
99
- slug: string = '';
100
- type: StationType = 'YEMEK';
101
- description: string = '';
102
- location: string = '';
103
- logo: string = '';
104
- banner: string = '';
105
- rating: number = 0;
106
- reviewCount: number = 0;
107
- owner: User | null = null;
108
-
109
- // Refactored to unified classes
110
- products?: StationProduct[] = [];
111
- equipment?: WorkstationEquipment[] = [];
112
- pricing?: StationPricing[] = [];
113
- coupons?: StationCoupon[] = [];
114
- facilities?: string[] = [];
115
-
116
- constructor(data: Partial<Station>) {
117
- Object.assign(this, data);
118
- if (!this.slug && this.name) {
119
- this.slug = this.name.toLowerCase()
120
- .replace(/\s+/g, '-')
121
- .replace(/[^a-z0-9-]/g, '');
122
- }
123
- }
124
-
125
- static fromJSON(json: Record<string, any>): Station {
126
- return new Station({
127
- id: json.id || '',
128
- name: json.name || '',
129
- slug: json.slug || '',
130
- type: json.type || 'YEMEK',
131
- description: json.description || '',
132
- location: json.location || '',
133
- logo: json.logo || '',
134
- banner: json.banner || '',
135
- rating: json.rating || 0,
136
- reviewCount: json.reviewCount || 0,
137
- owner: json.owner ? User.fromJSON(json.owner) : null,
138
- products: json.products?.map((p: any) => StationProduct.fromJSON(p)) || [],
139
- equipment: json.equipment?.map((e: any) => WorkstationEquipment.fromJSON(e)) || [],
140
- pricing: json.pricing,
141
- coupons: json.coupons?.map((c: any) => StationCoupon.fromJSON(c)) || [],
142
- facilities: json.facilities,
143
- });
144
- }
145
- }
@@ -1,53 +0,0 @@
1
- import { User } from '../auth/User';
2
- import { SurveyAnswer } from './SurveyAnswer';
3
-
4
- /**
5
- * Represents a community Survey (Anket) in the aramizdakioyuncu.com platform.
6
- */
7
- export class Survey {
8
- id: string = '';
9
- question: string = '';
10
- description?: string = '';
11
- options: SurveyAnswer[] = [];
12
- author: User | null = null;
13
- createdAt: string = '';
14
- expiresAt?: string = '';
15
- totalVotes: number = 0;
16
-
17
- // Current user's interaction state
18
- hasVoted: boolean = false;
19
- myVoteId?: string = '';
20
-
21
- constructor(data: Partial<Survey>) {
22
- Object.assign(this, data);
23
- this.totalVotes = this.options.reduce((sum, opt) => sum + opt.votes, 0);
24
- }
25
-
26
- /**
27
- * Helper to get percentage for a specific option.
28
- */
29
- getOptionPercentage(optionId: string): number {
30
- const option = this.options.find(o => o.id === optionId);
31
- if (!option || this.totalVotes === 0) return 0;
32
- return Math.round((option.votes / this.totalVotes) * 100);
33
- }
34
-
35
- /**
36
- * Instantiates a Survey object from a JSON object.
37
- */
38
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
- static fromJSON(json: Record<string, any>): Survey {
40
- return new Survey({
41
- id: json.id || '',
42
- question: json.question || '',
43
- description: json.description || '',
44
- options: Array.isArray(json.options) ? json.options.map((o: any) => SurveyAnswer.fromJSON(o)) : [],
45
- author: json.author ? User.fromJSON(json.author) : null,
46
- createdAt: json.createdAt || '',
47
- expiresAt: json.expiresAt || '',
48
- totalVotes: json.totalVotes || 0,
49
- hasVoted: json.hasVoted || false,
50
- myVoteId: json.myVoteId || '',
51
- });
52
- }
53
- }
@@ -1,26 +0,0 @@
1
- /**
2
- * Represents an answer option in a Survey.
3
- */
4
- export class SurveyAnswer {
5
- id: string = '';
6
- text: string = '';
7
- votes: number = 0;
8
- voterIds: string[] = [];
9
-
10
- constructor(data: Partial<SurveyAnswer>) {
11
- Object.assign(this, data);
12
- }
13
-
14
- /**
15
- * Instantiates a SurveyAnswer object from a JSON object.
16
- */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
- static fromJSON(json: Record<string, any>): SurveyAnswer {
19
- return new SurveyAnswer({
20
- id: json.id || '',
21
- text: json.text || '',
22
- votes: json.votes || 0,
23
- voterIds: json.voterIds || [],
24
- });
25
- }
26
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * Represents a Sports Team (Takım) in the aramizdakioyuncu.com platform.
3
- */
4
- export class Team {
5
- id: string = '';
6
- name: string = '';
7
- logo: string = '';
8
- primaryColor: string = '';
9
- shortName: string = '';
10
-
11
- constructor(data: Partial<Team>) {
12
- Object.assign(this, data);
13
- }
14
-
15
- static fromJSON(json: any): Team {
16
- return new Team({
17
- id: json.id || '',
18
- name: json.name || '',
19
- logo: json.logo || '',
20
- primaryColor: json.primaryColor || '#1d4ed8',
21
- shortName: json.shortName || ''
22
- });
23
- }
24
- }
@@ -1,32 +0,0 @@
1
- /**
2
- * Represents a Workplace (İşyeri/Ofis) in the aramizdakioyuncu.com platform.
3
- */
4
- export class Workplace {
5
- id: string = '';
6
- name: string = '';
7
- description: string = '';
8
- location: string = '';
9
- logo: string = '';
10
- website: string = '';
11
- establishedDate: string = '';
12
-
13
- constructor(data: Partial<Workplace>) {
14
- Object.assign(this, data);
15
- }
16
-
17
- /**
18
- * Instantiates a Workplace object from a JSON object.
19
- */
20
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
- static fromJSON(json: Record<string, any>): Workplace {
22
- return new Workplace({
23
- id: json.id || '',
24
- name: json.name || json.title || '',
25
- description: json.description || '',
26
- location: json.location || json.address || '',
27
- logo: json.logo || json.logo_url || '',
28
- website: json.website || '',
29
- establishedDate: json.establishedDate || json.created_at || '',
30
- });
31
- }
32
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * Represents a Game in the aramizdakioyuncu.com platform.
3
- */
4
- export class Game {
5
- id: string = '';
6
- name: string = '';
7
- slug: string = '';
8
- logo: string = '';
9
- poster: string = '';
10
- category: string = '';
11
- developer: string = '';
12
- description: string = '';
13
-
14
- constructor(data: Partial<Game>) {
15
- Object.assign(this, data);
16
- if (!this.slug && this.name) {
17
- this.slug = this.name.toLowerCase()
18
- .replace(/\s+/g, '-')
19
- .replace(/[^a-z0-9-]/g, '');
20
- }
21
- }
22
-
23
- /**
24
- * Instantiates a Game object from a JSON object.
25
- */
26
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
- static fromJSON(json: Record<string, any>): Game {
28
- return new Game({
29
- id: json.id || '',
30
- name: json.name || '',
31
- slug: json.slug || '',
32
- logo: json.logo || json.logo_url || '',
33
- poster: json.poster || json.poster_url || '',
34
- category: json.category || '',
35
- developer: json.developer || '',
36
- description: json.description || '',
37
- });
38
- }
39
- }
@@ -1,30 +0,0 @@
1
- /**
2
- * Represents a Media item (Fotoğraf/Video) in the aramizdakioyuncu.com platform.
3
- */
4
- export class Media {
5
- title: string = '';
6
- count: number = 0;
7
- author: string = '';
8
- date: string = '';
9
- category: string = '';
10
- image: string = '';
11
-
12
- constructor(data: Partial<Media>) {
13
- Object.assign(this, data);
14
- }
15
-
16
- /**
17
- * Instantiates a Media object from a JSON object.
18
- */
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- static fromJSON(json: Record<string, any>): Media {
21
- return new Media({
22
- title: json.title || '',
23
- count: json.count || 0,
24
- author: json.author || '',
25
- date: json.date || '',
26
- category: json.category || '',
27
- image: json.image || json.thumb || '',
28
- });
29
- }
30
- }
@@ -1,38 +0,0 @@
1
- import { User } from '../auth/User';
2
-
3
- /**
4
- * Represents a Game Mod (Oyun Modu) in the aramizdakioyuncu.com platform.
5
- */
6
- export class Mod {
7
- id: string = '';
8
- name: string = '';
9
- game: string = '';
10
- version: string = '';
11
- author: User | null = null;
12
- description: string = '';
13
- downloads: string = '';
14
- image: string = '';
15
- isFeatured: boolean = false;
16
-
17
- constructor(data: Partial<Mod>) {
18
- Object.assign(this, data);
19
- }
20
-
21
- /**
22
- * Instantiates a Mod object from a JSON object.
23
- */
24
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
- static fromJSON(json: Record<string, any>): Mod {
26
- return new Mod({
27
- id: json.id || '',
28
- name: json.name || json.title || '',
29
- game: json.game || '',
30
- version: json.version || '',
31
- author: json.author ? (json.author instanceof User ? json.author : User.fromJSON(json.author)) : (json.authorUsername ? new User({ username: json.authorUsername, displayName: json.authorName }) : null),
32
- description: json.description || json.desc || '',
33
- downloads: json.downloads || '0',
34
- image: json.image || '',
35
- isFeatured: json.isFeatured || false,
36
- });
37
- }
38
- }
@@ -1,43 +0,0 @@
1
- import { User } from '../auth/User';
2
-
3
- /**
4
- * Represents a News item (Haber) in the aramizdakioyuncu.com platform.
5
- */
6
- export class News {
7
- slug: string = '';
8
- title: string = '';
9
- excerpt: string = '';
10
- content: string = '';
11
- date: string = '';
12
- category: string = '';
13
- image: string = '';
14
- author: User | null = null;
15
-
16
- constructor(data: Partial<News>) {
17
- Object.assign(this, data);
18
- }
19
-
20
- /**
21
- * Returns the absolute URL to the news article.
22
- */
23
- getUrl(): string {
24
- return `/haberler/${this.slug}`;
25
- }
26
-
27
- /**
28
- * Instantiates a News object from a JSON object.
29
- */
30
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- static fromJSON(json: Record<string, any>): News {
32
- return new News({
33
- slug: json.slug || '',
34
- title: json.title || '',
35
- excerpt: json.excerpt || json.summary || '',
36
- content: json.content || '',
37
- date: json.date || '',
38
- category: json.category || '',
39
- image: json.image || '',
40
- author: json.author ? (json.author instanceof User ? json.author : User.fromJSON(json.author)) : (json.authorUsername ? new User({ username: json.authorUsername, displayName: json.authorName }) : null),
41
- });
42
- }
43
- }
@@ -1,49 +0,0 @@
1
- import { User } from '../auth/User';
2
- import { Group } from '../community/Group';
3
-
4
- export interface ProjectAuthor {
5
- user: User;
6
- role: string;
7
- }
8
-
9
- /**
10
- * Represents a Project in the aramizdakioyuncu.com platform.
11
- */
12
- export class Project {
13
- id: string = '';
14
- name: string = '';
15
- description: string = '';
16
- status: string = '';
17
- image: string = '';
18
- url: string = '';
19
- githubUrl: string = '';
20
- authors: ProjectAuthor[] = [];
21
- group: Group | null = null;
22
- techStack: string[] = [];
23
-
24
- constructor(data: Partial<Project>) {
25
- Object.assign(this, data);
26
- }
27
-
28
- /**
29
- * Instantiates a Project object from a JSON object.
30
- */
31
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
- static fromJSON(json: Record<string, any>): Project {
33
- return new Project({
34
- id: json.id || '',
35
- name: json.name || json.title || '',
36
- description: json.description || '',
37
- status: json.status || '',
38
- image: json.image || json.thumb || '',
39
- url: json.url || json.demoUrl || '',
40
- githubUrl: json.githubUrl || json.github || '',
41
- authors: Array.isArray(json.authors) ? json.authors.map((a: any) => ({
42
- user: a.user instanceof User ? a.user : User.fromJSON(a.user || a),
43
- role: a.role || 'Geliştirici'
44
- })) : [],
45
- group: json.group ? (json.group instanceof Group ? json.group : Group.fromJSON(json.group)) : null,
46
- techStack: Array.isArray(json.techStack) ? json.techStack : [],
47
- });
48
- }
49
- }
@@ -1,74 +0,0 @@
1
- import { GlobalStats } from '../../types/stats';
2
-
3
- /**
4
- * Platform Statistics Class
5
- * Bu sınıf, GlobalStats verisini sarmalar ve platform analitiği için yardımcı metodlar sunar.
6
- */
7
- export class PlatformStats implements GlobalStats {
8
- totalPlayers: number;
9
- malePlayers: number;
10
- femalePlayers: number;
11
- totalForums: number;
12
- totalPolls: number;
13
- activeUsers24h: number;
14
- totalMatchesPlayed: number;
15
- totalGuilds: number;
16
- monthlyVisitors: number;
17
- totalNews: number;
18
-
19
- constructor(data: GlobalStats) {
20
- this.totalPlayers = data.totalPlayers;
21
- this.malePlayers = data.malePlayers;
22
- this.femalePlayers = data.femalePlayers;
23
- this.totalForums = data.totalForums;
24
- this.totalPolls = data.totalPolls;
25
- this.activeUsers24h = data.activeUsers24h;
26
- this.totalMatchesPlayed = data.totalMatchesPlayed;
27
- this.totalGuilds = data.totalGuilds;
28
- this.monthlyVisitors = data.monthlyVisitors;
29
- this.totalNews = data.totalNews;
30
- }
31
-
32
- /**
33
- * Cinsiyet Dağılım Oranlarını Döndürür
34
- */
35
- getGenderDistribution() {
36
- const malePercent = Math.round((this.malePlayers / (this.malePlayers + this.femalePlayers)) * 100);
37
- const femalePercent = 100 - malePercent;
38
- return { malePercent, femalePercent };
39
- }
40
-
41
- /**
42
- * Bir metrik için büyüme oranını hesaplar (Mock Veri)
43
- */
44
- getGrowthRate(metric: keyof GlobalStats): number {
45
- // Gerçek bir veritabanında bu, dünkü veriye göre hesaplanırdı.
46
- // Şimdilik tutarlı olması için statik mock değerler dönüyoruz.
47
- const growthMap: Partial<Record<keyof GlobalStats, number>> = {
48
- totalPlayers: 12.4,
49
- activeUsers24h: 8.2,
50
- monthlyVisitors: 5.7,
51
- totalNews: 3.1,
52
- totalGuilds: 1.5,
53
- };
54
- return growthMap[metric] || 0;
55
- }
56
-
57
- /**
58
- * Harita verisi için günlük ziyaretçi trendini döndürür (Mock Veri)
59
- */
60
- getVisitorTrend() {
61
- return [45, 52, 48, 70, 61, 85, 92]; // Son 7 günün büyüme trendi (%)
62
- }
63
-
64
- /**
65
- * Forum, Anket ve Haberler bazında aktivite özeti
66
- */
67
- getActivityBreakdown() {
68
- return [
69
- { label: 'Forum Konuları', value: this.totalForums, color: '#3b82f6' },
70
- { label: 'Haber İçerikleri', value: this.totalNews, color: '#10b981' },
71
- { label: 'Aktif Anketler', value: this.totalPolls, color: '#f59e0b' },
72
- ];
73
- }
74
- }
@@ -1,59 +0,0 @@
1
- /**
2
- * System Settings Model
3
- * Platform genelindeki tüm ayarları tek bir noktadan yönetmek için tasarlanmıştır.
4
- */
5
- export class SystemSettings {
6
- siteTitle: string;
7
- siteDescription: string;
8
- isMaintenanceMode: boolean;
9
- isRegistrationOpen: boolean;
10
- contactEmail: string;
11
- version: string;
12
- socialLinks: {
13
- discord?: string;
14
- youtube?: string;
15
- instagram?: string;
16
- twitter?: string;
17
- github?: string;
18
- };
19
- branding: {
20
- logoUrl?: string;
21
- faviconUrl?: string;
22
- primaryColor?: string;
23
- };
24
-
25
- constructor(data: Partial<SystemSettings> = {}) {
26
- this.siteTitle = data.siteTitle || 'ARMOYU - Aramızdaki Oyuncu';
27
- this.siteDescription = data.siteDescription || 'Türkiye\'nin en büyük oyun topluluğu ve gelişim platformu.';
28
- this.isMaintenanceMode = data.isMaintenanceMode || false;
29
- this.isRegistrationOpen = data.isRegistrationOpen || true;
30
- this.contactEmail = data.contactEmail || 'iletisim@armoyu.com';
31
- this.version = data.version || 'v3.4.2-beta';
32
- this.socialLinks = data.socialLinks || {
33
- discord: 'https://discord.gg/armoyu',
34
- youtube: 'https://youtube.com/armoyu',
35
- instagram: 'https://instagram.com/armoyu',
36
- twitter: 'https://twitter.com/armoyu',
37
- github: 'https://github.com/armoyu'
38
- };
39
- this.branding = data.branding || {
40
- logoUrl: 'https://v3.armoyu.com/logo.png',
41
- faviconUrl: 'https://v3.armoyu.com/favicon.ico',
42
- primaryColor: '#3b82f6'
43
- };
44
- }
45
-
46
- /**
47
- * Ayarların bir kopyasını oluşturur (State yönetimi için)
48
- */
49
- clone(): SystemSettings {
50
- return new SystemSettings(JSON.parse(JSON.stringify(this)));
51
- }
52
-
53
- /**
54
- * Bakım modunu hızlıca değiştirir
55
- */
56
- toggleMaintenance() {
57
- this.isMaintenanceMode = !this.isMaintenanceMode;
58
- }
59
- }
@@ -1,37 +0,0 @@
1
- export * from './auth/User';
2
- export * from './auth/Role';
3
- export * from './auth/Session';
4
- export * from './social/Post';
5
- export * from './social/Comment';
6
- export * from './social/Story';
7
- export * from './social/Chat';
8
- export * from './social/ChatMessage';
9
- export * from './social/Notification';
10
- export * from './social/NotificationSender';
11
- export * from './social/Note';
12
- export * from './social/Leaderboard';
13
- export * from './community/Group';
14
- export * from './community/Giveaway';
15
- export * from './community/Forum';
16
- export * from './community/Workplace';
17
- export * from './community/Event';
18
- export * from './community/Station';
19
- export * from './community/Survey';
20
- export * from './community/SurveyAnswer';
21
- export * from './community/School';
22
- export * from './community/Faculty';
23
- export * from './community/Classroom';
24
- export * from './community/SchoolTeam';
25
- export * from './community/Team';
26
- export * from './store/StoreItem';
27
- export * from './shop/Product';
28
- export * from './shop/Order';
29
- export * from './shop/CartItem';
30
- export * from './core/PlatformStats';
31
- export * from './core/SystemSettings';
32
- export * from './social/SupportTicket';
33
- export * from './content/Game';
34
- export * from './content/Media';
35
- export * from './content/Mod';
36
- export * from './content/News';
37
- export * from './content/Project';
@@ -1,31 +0,0 @@
1
- import { Product } from './Product';
2
-
3
- export class CartItem {
4
- id: string; // Internal unique ID for the cart item
5
- product: Product;
6
- quantity: number;
7
- addedAt: number;
8
-
9
- constructor(data: Partial<CartItem>) {
10
- this.product = data.product || new Product({});
11
- this.id = data.id || `cart_${this.product.id}_${Date.now()}`;
12
- this.quantity = data.quantity || 1;
13
- this.addedAt = data.addedAt || Date.now();
14
- }
15
-
16
- /**
17
- * Calculate total price for this item based on quantity and display price.
18
- */
19
- getTotalPrice(): number {
20
- return this.product.getDisplayPrice() * this.quantity;
21
- }
22
-
23
- static fromJSON(json: any): CartItem {
24
- return new CartItem({
25
- id: json.id || '',
26
- product: json.product ? Product.fromJSON(json.product) : undefined,
27
- quantity: json.quantity || 1,
28
- addedAt: json.addedAt || Date.now()
29
- });
30
- }
31
- }