File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33// Config for yuges/subscribable
44
5- use Yuges \Package \Enums \KeyType ;
6-
75return [
86 /*
97 * FQCN (Fully Qualified Class Name) of the models to use for subscriptions
108 */
119 'models ' => [
1210 'plan ' => [
13- 'key ' => KeyType::Ulid ,
11+ 'key ' => Yuges \ Package \ Enums \ KeyType::BigInteger ,
1412 'class ' => Yuges \Subscribable \Models \Plan::class,
1513 ],
1614 'feature ' => [
17- 'key ' => KeyType::Ulid ,
15+ 'key ' => Yuges \ Package \ Enums \ KeyType::BigInteger ,
1816 'class ' => Yuges \Subscribable \Models \Feature::class,
1917 ],
2018 'subscriber ' => [
21- 'key ' => KeyType::Ulid ,
19+ 'key ' => Yuges \ Package \ Enums \ KeyType::BigInteger ,
2220 'default ' => [
2321 'class ' => \App \Models \User::class,
2422 ],
2927 ],
3028 ],
3129 'subscribable ' => [
32- 'key ' => KeyType::Ulid ,
30+ 'key ' => Yuges \ Package \ Enums \ KeyType::BigInteger ,
3331 'default ' => [
3432 'class ' => \App \Models \User::class,
3533 ],
4038 ],
4139 ],
4240 'subscription ' => [
43- 'key ' => KeyType::Ulid ,
41+ 'key ' => Yuges \ Package \ Enums \ KeyType::BigInteger ,
4442 'class ' => Yuges \Subscribable \Models \Subscription::class,
4543 ],
4644 ],
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public function up(): void
2626 $ table ->string ('name ' );
2727
2828 $ table ->timestamps ();
29- $ table ->softDeletes ();
3029 });
3130 }
3231};
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ public function up(): void
3434
3535 $ table ->timestamp ('expired_at ' )->nullable ();
3636 $ table ->timestamps ();
37- $ table ->softDeletes ();
3837 });
3938 }
4039};
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ public function up(): void
3535
3636 $ table ->timestamp ('expired_at ' )->nullable ();
3737 $ table ->timestamps ();
38- $ table ->softDeletes ();
3938 });
4039 }
4140};
Original file line number Diff line number Diff line change 33namespace Yuges \Subscribable \Models ;
44
55use Yuges \Package \Models \Model ;
6- use Illuminate \Database \Eloquent \Concerns \HasUlids ;
76use Illuminate \Database \Eloquent \Factories \HasFactory ;
87
98class Feature extends Model
109{
11- use
12- HasUlids,
13- HasFactory;
10+ use HasFactory;
1411
1512 protected $ table = 'features ' ;
1613
Original file line number Diff line number Diff line change 33namespace Yuges \Subscribable \Models ;
44
55use Yuges \Package \Models \Model ;
6- use Illuminate \Database \Eloquent \Concerns \HasUlids ;
76use Illuminate \Database \Eloquent \Factories \HasFactory ;
87
98class Plan extends Model
109{
11- use
12- HasUlids,
13- HasFactory;
10+ use HasFactory;
1411
1512 protected $ table = 'plans ' ;
1613
Original file line number Diff line number Diff line change 55use Yuges \Package \Models \Model ;
66use Yuges \Subscribable \Traits \HasSubscriber ;
77use Yuges \Subscribable \Traits \HasSubscribable ;
8- use Illuminate \Database \Eloquent \Concerns \HasUlids ;
98use Illuminate \Database \Eloquent \Factories \HasFactory ;
109
1110class Subscription extends Model
1211{
1312 use
14- HasUlids,
1513 HasFactory,
1614 HasSubscriber,
1715 HasSubscribable;
Original file line number Diff line number Diff line change @@ -19,12 +19,11 @@ public function up(): void
1919 }
2020
2121 Schema::create ($ this ->table , function (Blueprint $ table ) {
22- $ table ->key (KeyType::Ulid );
22+ $ table ->key (KeyType::BigInteger );
2323
2424 $ table ->string ('name ' );
2525
2626 $ table ->timestamps ();
27- $ table ->softDeletes ();
2827 });
2928 }
3029};
Original file line number Diff line number Diff line change 55use Yuges \Package \Models \Model ;
66use Yuges \Subscribable \Interfaces \Subscriber ;
77use Yuges \Subscribable \Interfaces \Subscribable ;
8- use Illuminate \Database \Eloquent \Concerns \HasUlids ;
98use Yuges \Subscribable \Traits \HasSubscriptionsAndCanSubscribe ;
109
1110class Channel extends Model implements Subscriber, Subscribable
1211{
13- use HasUlids, HasSubscriptionsAndCanSubscribe;
12+ use HasSubscriptionsAndCanSubscribe;
1413
1514 protected $ table = 'channels ' ;
1615
You can’t perform that action at this time.
0 commit comments