@allbluecn/database 0.10.1 → 0.11.0
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.
- package/generated/internal/class.ts +4 -4
- package/generated/internal/prismaNamespace.ts +4 -1
- package/generated/internal/prismaNamespaceBrowser.ts +4 -1
- package/generated/models/Label.ts +199 -3
- package/generated/models/Plan.ts +77 -1
- package/generated/models/Project.ts +264 -0
- package/generated-sqlite/internal/class.ts +4 -4
- package/generated-sqlite/internal/prismaNamespace.ts +3 -1
- package/generated-sqlite/internal/prismaNamespaceBrowser.ts +3 -1
- package/generated-sqlite/models/Plan.ts +77 -1
- package/migrations/20261029000000_plan_install_blob_quota/migration.sql +3 -0
- package/migrations/20261029000001_label_project_ownership/migration.sql +16 -0
- package/package.json +2 -2
- package/schema.prisma +12 -1
- package/schema.sqlite.prisma +2 -0
|
@@ -8762,7 +8762,9 @@ export const PlanScalarFieldEnum = {
|
|
|
8762
8762
|
skillQuota: 'skillQuota',
|
|
8763
8763
|
sandboxMinutesMonthly: 'sandboxMinutesMonthly',
|
|
8764
8764
|
mediaGenerationsMonthly: 'mediaGenerationsMonthly',
|
|
8765
|
-
galleryStorageMb: 'galleryStorageMb'
|
|
8765
|
+
galleryStorageMb: 'galleryStorageMb',
|
|
8766
|
+
installQuota: 'installQuota',
|
|
8767
|
+
blobStorageMb: 'blobStorageMb'
|
|
8766
8768
|
} as const
|
|
8767
8769
|
|
|
8768
8770
|
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
|
@@ -1285,7 +1285,9 @@ export const PlanScalarFieldEnum = {
|
|
|
1285
1285
|
skillQuota: 'skillQuota',
|
|
1286
1286
|
sandboxMinutesMonthly: 'sandboxMinutesMonthly',
|
|
1287
1287
|
mediaGenerationsMonthly: 'mediaGenerationsMonthly',
|
|
1288
|
-
galleryStorageMb: 'galleryStorageMb'
|
|
1288
|
+
galleryStorageMb: 'galleryStorageMb',
|
|
1289
|
+
installQuota: 'installQuota',
|
|
1290
|
+
blobStorageMb: 'blobStorageMb'
|
|
1289
1291
|
} as const
|
|
1290
1292
|
|
|
1291
1293
|
export type PlanScalarFieldEnum = (typeof PlanScalarFieldEnum)[keyof typeof PlanScalarFieldEnum]
|
|
@@ -40,6 +40,8 @@ export type PlanAvgAggregateOutputType = {
|
|
|
40
40
|
sandboxMinutesMonthly: number | null
|
|
41
41
|
mediaGenerationsMonthly: number | null
|
|
42
42
|
galleryStorageMb: number | null
|
|
43
|
+
installQuota: number | null
|
|
44
|
+
blobStorageMb: number | null
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
export type PlanSumAggregateOutputType = {
|
|
@@ -56,6 +58,8 @@ export type PlanSumAggregateOutputType = {
|
|
|
56
58
|
sandboxMinutesMonthly: number | null
|
|
57
59
|
mediaGenerationsMonthly: number | null
|
|
58
60
|
galleryStorageMb: number | null
|
|
61
|
+
installQuota: number | null
|
|
62
|
+
blobStorageMb: number | null
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
export type PlanMinAggregateOutputType = {
|
|
@@ -86,6 +90,8 @@ export type PlanMinAggregateOutputType = {
|
|
|
86
90
|
sandboxMinutesMonthly: number | null
|
|
87
91
|
mediaGenerationsMonthly: number | null
|
|
88
92
|
galleryStorageMb: number | null
|
|
93
|
+
installQuota: number | null
|
|
94
|
+
blobStorageMb: number | null
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
export type PlanMaxAggregateOutputType = {
|
|
@@ -116,6 +122,8 @@ export type PlanMaxAggregateOutputType = {
|
|
|
116
122
|
sandboxMinutesMonthly: number | null
|
|
117
123
|
mediaGenerationsMonthly: number | null
|
|
118
124
|
galleryStorageMb: number | null
|
|
125
|
+
installQuota: number | null
|
|
126
|
+
blobStorageMb: number | null
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
export type PlanCountAggregateOutputType = {
|
|
@@ -147,6 +155,8 @@ export type PlanCountAggregateOutputType = {
|
|
|
147
155
|
sandboxMinutesMonthly: number
|
|
148
156
|
mediaGenerationsMonthly: number
|
|
149
157
|
galleryStorageMb: number
|
|
158
|
+
installQuota: number
|
|
159
|
+
blobStorageMb: number
|
|
150
160
|
_all: number
|
|
151
161
|
}
|
|
152
162
|
|
|
@@ -165,6 +175,8 @@ export type PlanAvgAggregateInputType = {
|
|
|
165
175
|
sandboxMinutesMonthly?: true
|
|
166
176
|
mediaGenerationsMonthly?: true
|
|
167
177
|
galleryStorageMb?: true
|
|
178
|
+
installQuota?: true
|
|
179
|
+
blobStorageMb?: true
|
|
168
180
|
}
|
|
169
181
|
|
|
170
182
|
export type PlanSumAggregateInputType = {
|
|
@@ -181,6 +193,8 @@ export type PlanSumAggregateInputType = {
|
|
|
181
193
|
sandboxMinutesMonthly?: true
|
|
182
194
|
mediaGenerationsMonthly?: true
|
|
183
195
|
galleryStorageMb?: true
|
|
196
|
+
installQuota?: true
|
|
197
|
+
blobStorageMb?: true
|
|
184
198
|
}
|
|
185
199
|
|
|
186
200
|
export type PlanMinAggregateInputType = {
|
|
@@ -211,6 +225,8 @@ export type PlanMinAggregateInputType = {
|
|
|
211
225
|
sandboxMinutesMonthly?: true
|
|
212
226
|
mediaGenerationsMonthly?: true
|
|
213
227
|
galleryStorageMb?: true
|
|
228
|
+
installQuota?: true
|
|
229
|
+
blobStorageMb?: true
|
|
214
230
|
}
|
|
215
231
|
|
|
216
232
|
export type PlanMaxAggregateInputType = {
|
|
@@ -241,6 +257,8 @@ export type PlanMaxAggregateInputType = {
|
|
|
241
257
|
sandboxMinutesMonthly?: true
|
|
242
258
|
mediaGenerationsMonthly?: true
|
|
243
259
|
galleryStorageMb?: true
|
|
260
|
+
installQuota?: true
|
|
261
|
+
blobStorageMb?: true
|
|
244
262
|
}
|
|
245
263
|
|
|
246
264
|
export type PlanCountAggregateInputType = {
|
|
@@ -272,6 +290,8 @@ export type PlanCountAggregateInputType = {
|
|
|
272
290
|
sandboxMinutesMonthly?: true
|
|
273
291
|
mediaGenerationsMonthly?: true
|
|
274
292
|
galleryStorageMb?: true
|
|
293
|
+
installQuota?: true
|
|
294
|
+
blobStorageMb?: true
|
|
275
295
|
_all?: true
|
|
276
296
|
}
|
|
277
297
|
|
|
@@ -390,6 +410,8 @@ export type PlanGroupByOutputType = {
|
|
|
390
410
|
sandboxMinutesMonthly: number | null
|
|
391
411
|
mediaGenerationsMonthly: number | null
|
|
392
412
|
galleryStorageMb: number | null
|
|
413
|
+
installQuota: number | null
|
|
414
|
+
blobStorageMb: number | null
|
|
393
415
|
_count: PlanCountAggregateOutputType | null
|
|
394
416
|
_avg: PlanAvgAggregateOutputType | null
|
|
395
417
|
_sum: PlanSumAggregateOutputType | null
|
|
@@ -444,6 +466,8 @@ export type PlanWhereInput = {
|
|
|
444
466
|
sandboxMinutesMonthly?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
445
467
|
mediaGenerationsMonthly?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
446
468
|
galleryStorageMb?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
469
|
+
installQuota?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
470
|
+
blobStorageMb?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
447
471
|
subscriptions?: Prisma.SubscriptionListRelationFilter
|
|
448
472
|
}
|
|
449
473
|
|
|
@@ -476,6 +500,8 @@ export type PlanOrderByWithRelationInput = {
|
|
|
476
500
|
sandboxMinutesMonthly?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
477
501
|
mediaGenerationsMonthly?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
478
502
|
galleryStorageMb?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
503
|
+
installQuota?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
504
|
+
blobStorageMb?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
479
505
|
subscriptions?: Prisma.SubscriptionOrderByRelationAggregateInput
|
|
480
506
|
}
|
|
481
507
|
|
|
@@ -511,6 +537,8 @@ export type PlanWhereUniqueInput = Prisma.AtLeast<{
|
|
|
511
537
|
sandboxMinutesMonthly?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
512
538
|
mediaGenerationsMonthly?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
513
539
|
galleryStorageMb?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
540
|
+
installQuota?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
541
|
+
blobStorageMb?: Prisma.IntNullableFilter<"Plan"> | number | null
|
|
514
542
|
subscriptions?: Prisma.SubscriptionListRelationFilter
|
|
515
543
|
}, "id" | "name">
|
|
516
544
|
|
|
@@ -543,6 +571,8 @@ export type PlanOrderByWithAggregationInput = {
|
|
|
543
571
|
sandboxMinutesMonthly?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
544
572
|
mediaGenerationsMonthly?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
545
573
|
galleryStorageMb?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
574
|
+
installQuota?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
575
|
+
blobStorageMb?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
546
576
|
_count?: Prisma.PlanCountOrderByAggregateInput
|
|
547
577
|
_avg?: Prisma.PlanAvgOrderByAggregateInput
|
|
548
578
|
_max?: Prisma.PlanMaxOrderByAggregateInput
|
|
@@ -582,6 +612,8 @@ export type PlanScalarWhereWithAggregatesInput = {
|
|
|
582
612
|
sandboxMinutesMonthly?: Prisma.IntNullableWithAggregatesFilter<"Plan"> | number | null
|
|
583
613
|
mediaGenerationsMonthly?: Prisma.IntNullableWithAggregatesFilter<"Plan"> | number | null
|
|
584
614
|
galleryStorageMb?: Prisma.IntNullableWithAggregatesFilter<"Plan"> | number | null
|
|
615
|
+
installQuota?: Prisma.IntNullableWithAggregatesFilter<"Plan"> | number | null
|
|
616
|
+
blobStorageMb?: Prisma.IntNullableWithAggregatesFilter<"Plan"> | number | null
|
|
585
617
|
}
|
|
586
618
|
|
|
587
619
|
export type PlanCreateInput = {
|
|
@@ -613,6 +645,8 @@ export type PlanCreateInput = {
|
|
|
613
645
|
sandboxMinutesMonthly?: number | null
|
|
614
646
|
mediaGenerationsMonthly?: number | null
|
|
615
647
|
galleryStorageMb?: number | null
|
|
648
|
+
installQuota?: number | null
|
|
649
|
+
blobStorageMb?: number | null
|
|
616
650
|
subscriptions?: Prisma.SubscriptionCreateNestedManyWithoutPlanInput
|
|
617
651
|
}
|
|
618
652
|
|
|
@@ -645,6 +679,8 @@ export type PlanUncheckedCreateInput = {
|
|
|
645
679
|
sandboxMinutesMonthly?: number | null
|
|
646
680
|
mediaGenerationsMonthly?: number | null
|
|
647
681
|
galleryStorageMb?: number | null
|
|
682
|
+
installQuota?: number | null
|
|
683
|
+
blobStorageMb?: number | null
|
|
648
684
|
subscriptions?: Prisma.SubscriptionUncheckedCreateNestedManyWithoutPlanInput
|
|
649
685
|
}
|
|
650
686
|
|
|
@@ -677,6 +713,8 @@ export type PlanUpdateInput = {
|
|
|
677
713
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
678
714
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
679
715
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
716
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
717
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
680
718
|
subscriptions?: Prisma.SubscriptionUpdateManyWithoutPlanNestedInput
|
|
681
719
|
}
|
|
682
720
|
|
|
@@ -709,6 +747,8 @@ export type PlanUncheckedUpdateInput = {
|
|
|
709
747
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
710
748
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
711
749
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
750
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
751
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
712
752
|
subscriptions?: Prisma.SubscriptionUncheckedUpdateManyWithoutPlanNestedInput
|
|
713
753
|
}
|
|
714
754
|
|
|
@@ -741,6 +781,8 @@ export type PlanCreateManyInput = {
|
|
|
741
781
|
sandboxMinutesMonthly?: number | null
|
|
742
782
|
mediaGenerationsMonthly?: number | null
|
|
743
783
|
galleryStorageMb?: number | null
|
|
784
|
+
installQuota?: number | null
|
|
785
|
+
blobStorageMb?: number | null
|
|
744
786
|
}
|
|
745
787
|
|
|
746
788
|
export type PlanUpdateManyMutationInput = {
|
|
@@ -772,6 +814,8 @@ export type PlanUpdateManyMutationInput = {
|
|
|
772
814
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
773
815
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
774
816
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
817
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
818
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
775
819
|
}
|
|
776
820
|
|
|
777
821
|
export type PlanUncheckedUpdateManyInput = {
|
|
@@ -803,6 +847,8 @@ export type PlanUncheckedUpdateManyInput = {
|
|
|
803
847
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
804
848
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
805
849
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
850
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
851
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
806
852
|
}
|
|
807
853
|
|
|
808
854
|
export type PlanCountOrderByAggregateInput = {
|
|
@@ -834,6 +880,8 @@ export type PlanCountOrderByAggregateInput = {
|
|
|
834
880
|
sandboxMinutesMonthly?: Prisma.SortOrder
|
|
835
881
|
mediaGenerationsMonthly?: Prisma.SortOrder
|
|
836
882
|
galleryStorageMb?: Prisma.SortOrder
|
|
883
|
+
installQuota?: Prisma.SortOrder
|
|
884
|
+
blobStorageMb?: Prisma.SortOrder
|
|
837
885
|
}
|
|
838
886
|
|
|
839
887
|
export type PlanAvgOrderByAggregateInput = {
|
|
@@ -850,6 +898,8 @@ export type PlanAvgOrderByAggregateInput = {
|
|
|
850
898
|
sandboxMinutesMonthly?: Prisma.SortOrder
|
|
851
899
|
mediaGenerationsMonthly?: Prisma.SortOrder
|
|
852
900
|
galleryStorageMb?: Prisma.SortOrder
|
|
901
|
+
installQuota?: Prisma.SortOrder
|
|
902
|
+
blobStorageMb?: Prisma.SortOrder
|
|
853
903
|
}
|
|
854
904
|
|
|
855
905
|
export type PlanMaxOrderByAggregateInput = {
|
|
@@ -880,6 +930,8 @@ export type PlanMaxOrderByAggregateInput = {
|
|
|
880
930
|
sandboxMinutesMonthly?: Prisma.SortOrder
|
|
881
931
|
mediaGenerationsMonthly?: Prisma.SortOrder
|
|
882
932
|
galleryStorageMb?: Prisma.SortOrder
|
|
933
|
+
installQuota?: Prisma.SortOrder
|
|
934
|
+
blobStorageMb?: Prisma.SortOrder
|
|
883
935
|
}
|
|
884
936
|
|
|
885
937
|
export type PlanMinOrderByAggregateInput = {
|
|
@@ -910,6 +962,8 @@ export type PlanMinOrderByAggregateInput = {
|
|
|
910
962
|
sandboxMinutesMonthly?: Prisma.SortOrder
|
|
911
963
|
mediaGenerationsMonthly?: Prisma.SortOrder
|
|
912
964
|
galleryStorageMb?: Prisma.SortOrder
|
|
965
|
+
installQuota?: Prisma.SortOrder
|
|
966
|
+
blobStorageMb?: Prisma.SortOrder
|
|
913
967
|
}
|
|
914
968
|
|
|
915
969
|
export type PlanSumOrderByAggregateInput = {
|
|
@@ -926,6 +980,8 @@ export type PlanSumOrderByAggregateInput = {
|
|
|
926
980
|
sandboxMinutesMonthly?: Prisma.SortOrder
|
|
927
981
|
mediaGenerationsMonthly?: Prisma.SortOrder
|
|
928
982
|
galleryStorageMb?: Prisma.SortOrder
|
|
983
|
+
installQuota?: Prisma.SortOrder
|
|
984
|
+
blobStorageMb?: Prisma.SortOrder
|
|
929
985
|
}
|
|
930
986
|
|
|
931
987
|
export type PlanScalarRelationFilter = {
|
|
@@ -976,6 +1032,8 @@ export type PlanCreateWithoutSubscriptionsInput = {
|
|
|
976
1032
|
sandboxMinutesMonthly?: number | null
|
|
977
1033
|
mediaGenerationsMonthly?: number | null
|
|
978
1034
|
galleryStorageMb?: number | null
|
|
1035
|
+
installQuota?: number | null
|
|
1036
|
+
blobStorageMb?: number | null
|
|
979
1037
|
}
|
|
980
1038
|
|
|
981
1039
|
export type PlanUncheckedCreateWithoutSubscriptionsInput = {
|
|
@@ -1007,6 +1065,8 @@ export type PlanUncheckedCreateWithoutSubscriptionsInput = {
|
|
|
1007
1065
|
sandboxMinutesMonthly?: number | null
|
|
1008
1066
|
mediaGenerationsMonthly?: number | null
|
|
1009
1067
|
galleryStorageMb?: number | null
|
|
1068
|
+
installQuota?: number | null
|
|
1069
|
+
blobStorageMb?: number | null
|
|
1010
1070
|
}
|
|
1011
1071
|
|
|
1012
1072
|
export type PlanCreateOrConnectWithoutSubscriptionsInput = {
|
|
@@ -1054,6 +1114,8 @@ export type PlanUpdateWithoutSubscriptionsInput = {
|
|
|
1054
1114
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1055
1115
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1056
1116
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1117
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1118
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1057
1119
|
}
|
|
1058
1120
|
|
|
1059
1121
|
export type PlanUncheckedUpdateWithoutSubscriptionsInput = {
|
|
@@ -1085,6 +1147,8 @@ export type PlanUncheckedUpdateWithoutSubscriptionsInput = {
|
|
|
1085
1147
|
sandboxMinutesMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1086
1148
|
mediaGenerationsMonthly?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1087
1149
|
galleryStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1150
|
+
installQuota?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1151
|
+
blobStorageMb?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
1088
1152
|
}
|
|
1089
1153
|
|
|
1090
1154
|
|
|
@@ -1147,6 +1211,8 @@ export type PlanSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
|
|
1147
1211
|
sandboxMinutesMonthly?: boolean
|
|
1148
1212
|
mediaGenerationsMonthly?: boolean
|
|
1149
1213
|
galleryStorageMb?: boolean
|
|
1214
|
+
installQuota?: boolean
|
|
1215
|
+
blobStorageMb?: boolean
|
|
1150
1216
|
subscriptions?: boolean | Prisma.Plan$subscriptionsArgs<ExtArgs>
|
|
1151
1217
|
_count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs<ExtArgs>
|
|
1152
1218
|
}, ExtArgs["result"]["plan"]>
|
|
@@ -1180,6 +1246,8 @@ export type PlanSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
|
|
1180
1246
|
sandboxMinutesMonthly?: boolean
|
|
1181
1247
|
mediaGenerationsMonthly?: boolean
|
|
1182
1248
|
galleryStorageMb?: boolean
|
|
1249
|
+
installQuota?: boolean
|
|
1250
|
+
blobStorageMb?: boolean
|
|
1183
1251
|
}, ExtArgs["result"]["plan"]>
|
|
1184
1252
|
|
|
1185
1253
|
export type PlanSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
@@ -1211,6 +1279,8 @@ export type PlanSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
|
|
1211
1279
|
sandboxMinutesMonthly?: boolean
|
|
1212
1280
|
mediaGenerationsMonthly?: boolean
|
|
1213
1281
|
galleryStorageMb?: boolean
|
|
1282
|
+
installQuota?: boolean
|
|
1283
|
+
blobStorageMb?: boolean
|
|
1214
1284
|
}, ExtArgs["result"]["plan"]>
|
|
1215
1285
|
|
|
1216
1286
|
export type PlanSelectScalar = {
|
|
@@ -1242,9 +1312,11 @@ export type PlanSelectScalar = {
|
|
|
1242
1312
|
sandboxMinutesMonthly?: boolean
|
|
1243
1313
|
mediaGenerationsMonthly?: boolean
|
|
1244
1314
|
galleryStorageMb?: boolean
|
|
1315
|
+
installQuota?: boolean
|
|
1316
|
+
blobStorageMb?: boolean
|
|
1245
1317
|
}
|
|
1246
1318
|
|
|
1247
|
-
export type PlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "displayName" | "description" | "priceMonthly" | "priceYearly" | "currency" | "maxSeats" | "maxGuestSeats" | "maxWorkspaces" | "aiQuotaMonthly" | "features" | "isPublic" | "sortOrder" | "createdAt" | "updatedAt" | "providerPriceIdUsd" | "providerPriceIdCny" | "providerPriceIdUsdYearly" | "providerPriceIdCnyYearly" | "seatPriceMonthly" | "providerSeatPriceIdUsd" | "providerSeatPriceIdCny" | "agentQuota" | "skillQuota" | "sandboxMinutesMonthly" | "mediaGenerationsMonthly" | "galleryStorageMb", ExtArgs["result"]["plan"]>
|
|
1319
|
+
export type PlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "displayName" | "description" | "priceMonthly" | "priceYearly" | "currency" | "maxSeats" | "maxGuestSeats" | "maxWorkspaces" | "aiQuotaMonthly" | "features" | "isPublic" | "sortOrder" | "createdAt" | "updatedAt" | "providerPriceIdUsd" | "providerPriceIdCny" | "providerPriceIdUsdYearly" | "providerPriceIdCnyYearly" | "seatPriceMonthly" | "providerSeatPriceIdUsd" | "providerSeatPriceIdCny" | "agentQuota" | "skillQuota" | "sandboxMinutesMonthly" | "mediaGenerationsMonthly" | "galleryStorageMb" | "installQuota" | "blobStorageMb", ExtArgs["result"]["plan"]>
|
|
1248
1320
|
export type PlanInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
1249
1321
|
subscriptions?: boolean | Prisma.Plan$subscriptionsArgs<ExtArgs>
|
|
1250
1322
|
_count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs<ExtArgs>
|
|
@@ -1289,6 +1361,8 @@ export type $PlanPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
|
|
1289
1361
|
sandboxMinutesMonthly: number | null
|
|
1290
1362
|
mediaGenerationsMonthly: number | null
|
|
1291
1363
|
galleryStorageMb: number | null
|
|
1364
|
+
installQuota: number | null
|
|
1365
|
+
blobStorageMb: number | null
|
|
1292
1366
|
}, ExtArgs["result"]["plan"]>
|
|
1293
1367
|
composites: {}
|
|
1294
1368
|
}
|
|
@@ -1741,6 +1815,8 @@ export interface PlanFieldRefs {
|
|
|
1741
1815
|
readonly sandboxMinutesMonthly: Prisma.FieldRef<"Plan", 'Int'>
|
|
1742
1816
|
readonly mediaGenerationsMonthly: Prisma.FieldRef<"Plan", 'Int'>
|
|
1743
1817
|
readonly galleryStorageMb: Prisma.FieldRef<"Plan", 'Int'>
|
|
1818
|
+
readonly installQuota: Prisma.FieldRef<"Plan", 'Int'>
|
|
1819
|
+
readonly blobStorageMb: Prisma.FieldRef<"Plan", 'Int'>
|
|
1744
1820
|
}
|
|
1745
1821
|
|
|
1746
1822
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- S24/S4:标签项目归属 + 部分唯一索引(PG WHERE 子句,Prisma 不声明——
|
|
2
|
+
-- 管护方式见 DECISIONS「S4 部分唯一索引」裁决:原生 SQL 迁移 + 台账登记)
|
|
3
|
+
ALTER TABLE "labels" ADD COLUMN "projectId" TEXT;
|
|
4
|
+
|
|
5
|
+
CREATE INDEX "labels_projectId_idx" ON "labels"("projectId");
|
|
6
|
+
|
|
7
|
+
-- 去全局 name 唯一(S24 病根:标签名全局唯一 = 全局共享命名空间)
|
|
8
|
+
DROP INDEX "labels_name_key";
|
|
9
|
+
|
|
10
|
+
-- 项目内 (projectId, name) 唯一(仅限项目标签;存量全局标签不受约束)
|
|
11
|
+
CREATE UNIQUE INDEX "labels_project_name_key" ON "labels"("projectId", "name") WHERE "projectId" IS NOT NULL;
|
|
12
|
+
|
|
13
|
+
-- 存量全局标签保持 name 唯一(只读兼容面)
|
|
14
|
+
CREATE UNIQUE INDEX "labels_name_global_key" ON "labels"("name") WHERE "projectId" IS NULL;
|
|
15
|
+
|
|
16
|
+
ALTER TABLE "labels" ADD CONSTRAINT "labels_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
7
7
|
"types": "./index.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@allbluecn/kernel": "0.
|
|
9
|
+
"@allbluecn/kernel": "0.12.0",
|
|
10
10
|
"@prisma/adapter-better-sqlite3": "^7.9.0",
|
|
11
11
|
"@prisma/adapter-pg": "7.8.0",
|
|
12
12
|
"@prisma/client": "7.8.0",
|
package/schema.prisma
CHANGED
|
@@ -200,6 +200,9 @@ model Project {
|
|
|
200
200
|
@@unique([ownerId, displayId])
|
|
201
201
|
@@index([ownerId])
|
|
202
202
|
@@index([workspaceId])
|
|
203
|
+
// S24:项目归属标签(全局存量标签 projectId 为空,不属于任何项目)
|
|
204
|
+
labels Label[] @relation("labelProject")
|
|
205
|
+
|
|
203
206
|
@@map("projects")
|
|
204
207
|
}
|
|
205
208
|
|
|
@@ -1623,16 +1626,22 @@ model Story {
|
|
|
1623
1626
|
// 全局标签
|
|
1624
1627
|
model Label {
|
|
1625
1628
|
id String @id @default(cuid())
|
|
1626
|
-
|
|
1629
|
+
// S24:项目归属(可空=存量全局标签,只读兼容);新标签必挂项目。
|
|
1630
|
+
// 唯一性由部分唯一索引承载(PG WHERE 子句,Prisma 不声明——见迁移
|
|
1631
|
+
// 20261029000001):项目内 (projectId, name) 唯一;存量全局 name 唯一。
|
|
1632
|
+
name String
|
|
1627
1633
|
color String @default("#6b7280")
|
|
1628
1634
|
createdById String
|
|
1629
1635
|
createdBy User @relation("labelCreator", fields: [createdById], references: [id], onDelete: Restrict)
|
|
1636
|
+
projectId String?
|
|
1637
|
+
project Project? @relation("labelProject", fields: [projectId], references: [id], onDelete: Cascade)
|
|
1630
1638
|
stories StoryLabel[]
|
|
1631
1639
|
bugLabels BugLabel[]
|
|
1632
1640
|
createdAt DateTime @default(now())
|
|
1633
1641
|
|
|
1634
1642
|
@@map("labels")
|
|
1635
1643
|
@@index([createdById])
|
|
1644
|
+
@@index([projectId])
|
|
1636
1645
|
}
|
|
1637
1646
|
|
|
1638
1647
|
model StoryLabel {
|
|
@@ -2004,6 +2013,8 @@ model Plan {
|
|
|
2004
2013
|
sandboxMinutesMonthly Int?
|
|
2005
2014
|
mediaGenerationsMonthly Int?
|
|
2006
2015
|
galleryStorageMb Int?
|
|
2016
|
+
installQuota Int?
|
|
2017
|
+
blobStorageMb Int?
|
|
2007
2018
|
|
|
2008
2019
|
subscriptions Subscription[]
|
|
2009
2020
|
|