1212// ignore_for_file: no_leading_underscores_for_library_prefixes
1313import 'package:serverpod_client/serverpod_client.dart' as _i1;
1414import '../../../domains/billing/models/owner.dart' as _i2;
15- import '../../../domains/billing/models/subscription.dart' as _i3;
16- import '../../../features/project/models/role.dart' as _i4;
17- import '../../../domains/capsules/models/capsule.dart' as _i5;
15+ import '../../../features/project/models/role.dart' as _i3;
16+ import '../../../domains/capsules/models/capsule.dart' as _i4;
1817
1918/// Represents a project of a tenant.
2019/// Typically a serverpod project.
@@ -27,7 +26,6 @@ abstract class Project implements _i1.SerializableModel {
2726 required this .cloudProjectId,
2827 required this .ownerId,
2928 this .owner,
30- this .subscription,
3129 this .roles,
3230 this .capsules,
3331 }) : createdAt = createdAt ?? DateTime .now (),
@@ -41,9 +39,8 @@ abstract class Project implements _i1.SerializableModel {
4139 required String cloudProjectId,
4240 required _i1.UuidValue ownerId,
4341 _i2.Owner ? owner,
44- _i3.Subscription ? subscription,
45- List <_i4.Role >? roles,
46- List <_i5.Capsule >? capsules,
42+ List <_i3.Role >? roles,
43+ List <_i4.Capsule >? capsules,
4744 }) = _ProjectImpl ;
4845
4946 factory Project .fromJson (Map <String , dynamic > jsonSerialization) {
@@ -63,15 +60,11 @@ abstract class Project implements _i1.SerializableModel {
6360 ? null
6461 : _i2.Owner .fromJson (
6562 (jsonSerialization['owner' ] as Map <String , dynamic >)),
66- subscription: jsonSerialization['subscription' ] == null
67- ? null
68- : _i3.Subscription .fromJson (
69- (jsonSerialization['subscription' ] as Map <String , dynamic >)),
7063 roles: (jsonSerialization['roles' ] as List ? )
71- ? .map ((e) => _i4 .Role .fromJson ((e as Map <String , dynamic >)))
64+ ? .map ((e) => _i3 .Role .fromJson ((e as Map <String , dynamic >)))
7265 .toList (),
7366 capsules: (jsonSerialization['capsules' ] as List ? )
74- ? .map ((e) => _i5 .Capsule .fromJson ((e as Map <String , dynamic >)))
67+ ? .map ((e) => _i4 .Capsule .fromJson ((e as Map <String , dynamic >)))
7568 .toList (),
7669 );
7770 }
@@ -98,15 +91,11 @@ abstract class Project implements _i1.SerializableModel {
9891 /// The owner of the project.
9992 _i2.Owner ? owner;
10093
101- /// The subscription for this project.
102- /// DEPRECATED, will likely be removed
103- _i3.Subscription ? subscription;
104-
10594 /// The roles for this project.
106- List <_i4 .Role >? roles;
95+ List <_i3 .Role >? roles;
10796
10897 /// The capsules belonging to this project.
109- List <_i5 .Capsule >? capsules;
98+ List <_i4 .Capsule >? capsules;
11099
111100 /// Returns a shallow copy of this [Project]
112101 /// with some or all fields replaced by the given arguments.
@@ -119,9 +108,8 @@ abstract class Project implements _i1.SerializableModel {
119108 String ? cloudProjectId,
120109 _i1.UuidValue ? ownerId,
121110 _i2.Owner ? owner,
122- _i3.Subscription ? subscription,
123- List <_i4.Role >? roles,
124- List <_i5.Capsule >? capsules,
111+ List <_i3.Role >? roles,
112+ List <_i4.Capsule >? capsules,
125113 });
126114 @override
127115 Map <String , dynamic > toJson () {
@@ -133,7 +121,6 @@ abstract class Project implements _i1.SerializableModel {
133121 'cloudProjectId' : cloudProjectId,
134122 'ownerId' : ownerId.toJson (),
135123 if (owner != null ) 'owner' : owner? .toJson (),
136- if (subscription != null ) 'subscription' : subscription? .toJson (),
137124 if (roles != null ) 'roles' : roles? .toJson (valueToJson: (v) => v.toJson ()),
138125 if (capsules != null )
139126 'capsules' : capsules? .toJson (valueToJson: (v) => v.toJson ()),
@@ -157,9 +144,8 @@ class _ProjectImpl extends Project {
157144 required String cloudProjectId,
158145 required _i1.UuidValue ownerId,
159146 _i2.Owner ? owner,
160- _i3.Subscription ? subscription,
161- List <_i4.Role >? roles,
162- List <_i5.Capsule >? capsules,
147+ List <_i3.Role >? roles,
148+ List <_i4.Capsule >? capsules,
163149 }) : super ._(
164150 id: id,
165151 createdAt: createdAt,
@@ -168,7 +154,6 @@ class _ProjectImpl extends Project {
168154 cloudProjectId: cloudProjectId,
169155 ownerId: ownerId,
170156 owner: owner,
171- subscription: subscription,
172157 roles: roles,
173158 capsules: capsules,
174159 );
@@ -185,7 +170,6 @@ class _ProjectImpl extends Project {
185170 String ? cloudProjectId,
186171 _i1.UuidValue ? ownerId,
187172 Object ? owner = _Undefined ,
188- Object ? subscription = _Undefined ,
189173 Object ? roles = _Undefined ,
190174 Object ? capsules = _Undefined ,
191175 }) {
@@ -197,13 +181,10 @@ class _ProjectImpl extends Project {
197181 cloudProjectId: cloudProjectId ?? this .cloudProjectId,
198182 ownerId: ownerId ?? this .ownerId,
199183 owner: owner is _i2.Owner ? ? owner : this .owner? .copyWith (),
200- subscription: subscription is _i3.Subscription ?
201- ? subscription
202- : this .subscription? .copyWith (),
203- roles: roles is List <_i4.Role >?
184+ roles: roles is List <_i3.Role >?
204185 ? roles
205186 : this .roles? .map ((e0) => e0.copyWith ()).toList (),
206- capsules: capsules is List <_i5 .Capsule >?
187+ capsules: capsules is List <_i4 .Capsule >?
207188 ? capsules
208189 : this .capsules? .map ((e0) => e0.copyWith ()).toList (),
209190 );
0 commit comments