Best Python code snippet using pandera_python
graphql.ts
Source:graphql.ts  
1/*2 * -------------------------------------------------------3 * THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)4 * -------------------------------------------------------5 */6/* tslint:disable */7/* eslint-disable */8export enum CommonLangDir {9    LTR = "LTR",10    RTL = "RTL"11}12export interface CommonCreateAdministrativeAreaLevel1Input {13    id: string;14    countryId: string;15    code: GraphQLString;16    customCode?: Nullable<GraphQLString>;17    name: GraphQLString;18    slug: GraphQLString;19    latitude?: Nullable<GraphQLFloat>;20    longitude?: Nullable<GraphQLFloat>;21    zoom?: Nullable<GraphQLInt>;22}23export interface CommonUpdateAdministrativeAreaLevel1ByIdInput {24    id: string;25    countryId?: Nullable<string>;26    code?: Nullable<GraphQLString>;27    customCode?: Nullable<GraphQLString>;28    name?: Nullable<GraphQLString>;29    slug?: Nullable<GraphQLString>;30    latitude?: Nullable<GraphQLFloat>;31    longitude?: Nullable<GraphQLFloat>;32    zoom?: Nullable<GraphQLInt>;33}34export interface CommonUpdateAdministrativeAreasLevel1Input {35    id?: Nullable<string>;36    countryId?: Nullable<string>;37    code?: Nullable<GraphQLString>;38    customCode?: Nullable<GraphQLString>;39    name?: Nullable<GraphQLString>;40    slug?: Nullable<GraphQLString>;41    latitude?: Nullable<GraphQLFloat>;42    longitude?: Nullable<GraphQLFloat>;43    zoom?: Nullable<GraphQLInt>;44}45export interface CommonCreateAdministrativeAreaLevel2Input {46    id: string;47    countryId: string;48    administrativeAreaLevel1Id: string;49    code: GraphQLString;50    customCode?: Nullable<GraphQLString>;51    name: GraphQLString;52    slug: GraphQLString;53    latitude?: Nullable<GraphQLFloat>;54    longitude?: Nullable<GraphQLFloat>;55    zoom?: Nullable<GraphQLInt>;56}57export interface CommonUpdateAdministrativeAreaLevel2ByIdInput {58    id: string;59    countryId?: Nullable<string>;60    administrativeAreaLevel1Id?: Nullable<string>;61    code?: Nullable<GraphQLString>;62    customCode?: Nullable<GraphQLString>;63    name?: Nullable<GraphQLString>;64    slug?: Nullable<GraphQLString>;65    latitude?: Nullable<GraphQLFloat>;66    longitude?: Nullable<GraphQLFloat>;67    zoom?: Nullable<GraphQLInt>;68}69export interface CommonUpdateAdministrativeAreasLevel2Input {70    id?: Nullable<string>;71    countryId?: Nullable<string>;72    administrativeAreaLevel1Id?: Nullable<string>;73    code?: Nullable<GraphQLString>;74    customCode?: Nullable<GraphQLString>;75    name?: Nullable<GraphQLString>;76    slug?: Nullable<GraphQLString>;77    latitude?: Nullable<GraphQLFloat>;78    longitude?: Nullable<GraphQLFloat>;79    zoom?: Nullable<GraphQLInt>;80}81export interface CommonCreateAdministrativeAreaLevel3Input {82    id: string;83    countryId: string;84    administrativeAreaLevel1Id: string;85    administrativeAreaLevel2Id: string;86    code: GraphQLString;87    customCode?: Nullable<GraphQLString>;88    name: GraphQLString;89    slug: GraphQLString;90    latitude?: Nullable<GraphQLFloat>;91    longitude?: Nullable<GraphQLFloat>;92    zoom?: Nullable<GraphQLInt>;93}94export interface CommonUpdateAdministrativeAreaLevel3ByIdInput {95    id: string;96    countryId?: Nullable<string>;97    administrativeAreaLevel1Id?: Nullable<string>;98    administrativeAreaLevel2Id?: Nullable<string>;99    code?: Nullable<GraphQLString>;100    customCode?: Nullable<GraphQLString>;101    name?: Nullable<GraphQLString>;102    slug?: Nullable<GraphQLString>;103    latitude?: Nullable<GraphQLFloat>;104    longitude?: Nullable<GraphQLFloat>;105    zoom?: Nullable<GraphQLInt>;106}107export interface CommonUpdateAdministrativeAreasLevel3Input {108    id?: Nullable<string>;109    countryId?: Nullable<string>;110    administrativeAreaLevel1Id?: Nullable<string>;111    administrativeAreaLevel2Id?: Nullable<string>;112    code?: Nullable<GraphQLString>;113    customCode?: Nullable<GraphQLString>;114    name?: Nullable<GraphQLString>;115    slug?: Nullable<GraphQLString>;116    latitude?: Nullable<GraphQLFloat>;117    longitude?: Nullable<GraphQLFloat>;118    zoom?: Nullable<GraphQLInt>;119}120export interface CommonCreateCountryInput {121    id: string;122    iso3166Alpha2: GraphQLString;123    iso3166Alpha3: GraphQLString;124    iso3166Numeric: GraphQLString;125    customCode?: Nullable<GraphQLString>;126    prefix?: Nullable<GraphQLString>;127    image?: Nullable<GraphQLString>;128    sort?: Nullable<GraphQLInt>;129    administrativeAreas?: Nullable<JSON>;130    latitude?: Nullable<GraphQLFloat>;131    longitude?: Nullable<GraphQLFloat>;132    zoom?: Nullable<GraphQLInt>;133    dataLang?: Nullable<JSON>;134    langId: string;135    name: GraphQLString;136    slug: GraphQLString;137    administrativeAreaLevel1?: Nullable<GraphQLString>;138    administrativeAreaLevel2?: Nullable<GraphQLString>;139    administrativeAreaLevel3?: Nullable<GraphQLString>;140}141export interface CommonUpdateCountryByIdInput {142    id: string;143    iso3166Alpha2?: Nullable<GraphQLString>;144    iso3166Alpha3?: Nullable<GraphQLString>;145    iso3166Numeric?: Nullable<GraphQLString>;146    customCode?: Nullable<GraphQLString>;147    prefix?: Nullable<GraphQLString>;148    image?: Nullable<GraphQLString>;149    sort?: Nullable<GraphQLInt>;150    administrativeAreas?: Nullable<JSON>;151    latitude?: Nullable<GraphQLFloat>;152    longitude?: Nullable<GraphQLFloat>;153    zoom?: Nullable<GraphQLInt>;154    dataLang?: Nullable<JSON>;155    langId?: Nullable<string>;156    name?: Nullable<GraphQLString>;157    slug?: Nullable<GraphQLString>;158    administrativeAreaLevel1?: Nullable<GraphQLString>;159    administrativeAreaLevel2?: Nullable<GraphQLString>;160    administrativeAreaLevel3?: Nullable<GraphQLString>;161}162export interface CommonUpdateCountriesInput {163    id?: Nullable<string>;164    iso3166Alpha2?: Nullable<GraphQLString>;165    iso3166Alpha3?: Nullable<GraphQLString>;166    iso3166Numeric?: Nullable<GraphQLString>;167    customCode?: Nullable<GraphQLString>;168    prefix?: Nullable<GraphQLString>;169    image?: Nullable<GraphQLString>;170    sort?: Nullable<GraphQLInt>;171    administrativeAreas?: Nullable<JSON>;172    latitude?: Nullable<GraphQLFloat>;173    longitude?: Nullable<GraphQLFloat>;174    zoom?: Nullable<GraphQLInt>;175    dataLang?: Nullable<JSON>;176    langId?: Nullable<string>;177    name?: Nullable<GraphQLString>;178    slug?: Nullable<GraphQLString>;179    administrativeAreaLevel1?: Nullable<GraphQLString>;180    administrativeAreaLevel2?: Nullable<GraphQLString>;181    administrativeAreaLevel3?: Nullable<GraphQLString>;182}183export interface CommonCreateLangInput {184    id: string;185    name: GraphQLString;186    image?: Nullable<GraphQLString>;187    iso6392: GraphQLString;188    iso6393: GraphQLString;189    ietf: GraphQLString;190    customCode?: Nullable<GraphQLString>;191    dir: CommonLangDir;192    sort?: Nullable<GraphQLInt>;193    isActive: GraphQLBoolean;194}195export interface CommonUpdateLangByIdInput {196    id: string;197    name?: Nullable<GraphQLString>;198    image?: Nullable<GraphQLString>;199    iso6392?: Nullable<GraphQLString>;200    iso6393?: Nullable<GraphQLString>;201    ietf?: Nullable<GraphQLString>;202    customCode?: Nullable<GraphQLString>;203    dir?: Nullable<CommonLangDir>;204    sort?: Nullable<GraphQLInt>;205    isActive?: Nullable<GraphQLBoolean>;206}207export interface CommonUpdateLangsInput {208    id?: Nullable<string>;209    name?: Nullable<GraphQLString>;210    image?: Nullable<GraphQLString>;211    iso6392?: Nullable<GraphQLString>;212    iso6393?: Nullable<GraphQLString>;213    ietf?: Nullable<GraphQLString>;214    customCode?: Nullable<GraphQLString>;215    dir?: Nullable<CommonLangDir>;216    sort?: Nullable<GraphQLInt>;217    isActive?: Nullable<GraphQLBoolean>;218}219export interface QueryStatement {220    where?: Nullable<JSON>;221    include?: Nullable<Nullable<GraphQLString>[]>;222    order?: Nullable<JSON>;223    limit?: Nullable<GraphQLInt>;224    offset?: Nullable<GraphQLInt>;225}226export interface CommonAdministrativeAreaLevel1 {227    id: string;228    countryId: string;229    country?: Nullable<CommonCountry>;230    code: GraphQLString;231    customCode?: Nullable<GraphQLString>;232    name: GraphQLString;233    slug: GraphQLString;234    latitude?: Nullable<GraphQLFloat>;235    longitude?: Nullable<GraphQLFloat>;236    zoom?: Nullable<GraphQLInt>;237    createdAt?: Nullable<GraphQLTimestamp>;238    updatedAt?: Nullable<GraphQLTimestamp>;239    deletedAt?: Nullable<GraphQLTimestamp>;240}241export interface IQuery {242    commonFindAdministrativeAreaLevel1(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1> | Promise<Nullable<CommonAdministrativeAreaLevel1>>;243    commonFindAdministrativeAreaLevel1ById(id?: Nullable<string>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1> | Promise<Nullable<CommonAdministrativeAreaLevel1>>;244    commonGetAdministrativeAreasLevel1(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1>[] | Promise<Nullable<CommonAdministrativeAreaLevel1>[]>;245    commonPaginateAdministrativeAreasLevel1(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Pagination | Promise<Pagination>;246    commonFindAdministrativeAreaLevel2(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2> | Promise<Nullable<CommonAdministrativeAreaLevel2>>;247    commonFindAdministrativeAreaLevel2ById(id?: Nullable<string>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2> | Promise<Nullable<CommonAdministrativeAreaLevel2>>;248    commonGetAdministrativeAreasLevel2(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2>[] | Promise<Nullable<CommonAdministrativeAreaLevel2>[]>;249    commonPaginateAdministrativeAreasLevel2(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Pagination | Promise<Pagination>;250    commonFindAdministrativeAreaLevel3(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3> | Promise<Nullable<CommonAdministrativeAreaLevel3>>;251    commonFindAdministrativeAreaLevel3ById(id?: Nullable<string>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3> | Promise<Nullable<CommonAdministrativeAreaLevel3>>;252    commonGetAdministrativeAreasLevel3(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3>[] | Promise<Nullable<CommonAdministrativeAreaLevel3>[]>;253    commonPaginateAdministrativeAreasLevel3(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Pagination | Promise<Pagination>;254    commonFindCountry(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry> | Promise<Nullable<CommonCountry>>;255    commonFindCountryById(id?: Nullable<string>, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry> | Promise<Nullable<CommonCountry>>;256    commonGetCountries(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry>[] | Promise<Nullable<CommonCountry>[]>;257    commonPaginateCountries(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Pagination | Promise<Pagination>;258    commonFindLang(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonLang> | Promise<Nullable<CommonLang>>;259    commonFindLangById(id?: Nullable<string>, constraint?: Nullable<QueryStatement>): Nullable<CommonLang> | Promise<Nullable<CommonLang>>;260    commonGetLangs(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonLang>[] | Promise<Nullable<CommonLang>[]>;261    commonPaginateLangs(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Pagination | Promise<Pagination>;262    hello(): Nullable<string> | Promise<Nullable<string>>;263}264export interface IMutation {265    commonCreateAdministrativeAreaLevel1(payload: CommonCreateAdministrativeAreaLevel1Input): Nullable<CommonAdministrativeAreaLevel1> | Promise<Nullable<CommonAdministrativeAreaLevel1>>;266    commonCreateAdministrativeAreasLevel1(payload: Nullable<CommonCreateAdministrativeAreaLevel1Input>[]): boolean | Promise<boolean>;267    commonUpdateAdministrativeAreaLevel1ById(payload: CommonUpdateAdministrativeAreaLevel1ByIdInput, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1> | Promise<Nullable<CommonAdministrativeAreaLevel1>>;268    commonUpdateAdministrativeAreasLevel1(payload: CommonUpdateAdministrativeAreasLevel1Input, query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1>[] | Promise<Nullable<CommonAdministrativeAreaLevel1>[]>;269    commonDeleteAdministrativeAreaLevel1ById(id: string, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1> | Promise<Nullable<CommonAdministrativeAreaLevel1>>;270    commonDeleteAdministrativeAreasLevel1(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel1>[] | Promise<Nullable<CommonAdministrativeAreaLevel1>[]>;271    commonCreateAdministrativeAreaLevel2(payload: CommonCreateAdministrativeAreaLevel2Input): Nullable<CommonAdministrativeAreaLevel2> | Promise<Nullable<CommonAdministrativeAreaLevel2>>;272    commonCreateAdministrativeAreasLevel2(payload: Nullable<CommonCreateAdministrativeAreaLevel2Input>[]): boolean | Promise<boolean>;273    commonUpdateAdministrativeAreaLevel2ById(payload: CommonUpdateAdministrativeAreaLevel2ByIdInput, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2> | Promise<Nullable<CommonAdministrativeAreaLevel2>>;274    commonUpdateAdministrativeAreasLevel2(payload: CommonUpdateAdministrativeAreasLevel2Input, query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2>[] | Promise<Nullable<CommonAdministrativeAreaLevel2>[]>;275    commonDeleteAdministrativeAreaLevel2ById(id: string, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2> | Promise<Nullable<CommonAdministrativeAreaLevel2>>;276    commonDeleteAdministrativeAreasLevel2(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel2>[] | Promise<Nullable<CommonAdministrativeAreaLevel2>[]>;277    commonCreateAdministrativeAreaLevel3(payload: CommonCreateAdministrativeAreaLevel3Input): Nullable<CommonAdministrativeAreaLevel3> | Promise<Nullable<CommonAdministrativeAreaLevel3>>;278    commonCreateAdministrativeAreasLevel3(payload: Nullable<CommonCreateAdministrativeAreaLevel3Input>[]): boolean | Promise<boolean>;279    commonUpdateAdministrativeAreaLevel3ById(payload: CommonUpdateAdministrativeAreaLevel3ByIdInput, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3> | Promise<Nullable<CommonAdministrativeAreaLevel3>>;280    commonUpdateAdministrativeAreasLevel3(payload: CommonUpdateAdministrativeAreasLevel3Input, query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3>[] | Promise<Nullable<CommonAdministrativeAreaLevel3>[]>;281    commonDeleteAdministrativeAreaLevel3ById(id: string, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3> | Promise<Nullable<CommonAdministrativeAreaLevel3>>;282    commonDeleteAdministrativeAreasLevel3(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonAdministrativeAreaLevel3>[] | Promise<Nullable<CommonAdministrativeAreaLevel3>[]>;283    commonCreateCountry(payload: CommonCreateCountryInput): Nullable<CommonCountry> | Promise<Nullable<CommonCountry>>;284    commonCreateCountries(payload: Nullable<CommonCreateCountryInput>[]): boolean | Promise<boolean>;285    commonUpdateCountryById(payload: CommonUpdateCountryByIdInput, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry> | Promise<Nullable<CommonCountry>>;286    commonUpdateCountries(payload: CommonUpdateCountriesInput, query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry>[] | Promise<Nullable<CommonCountry>[]>;287    commonDeleteCountryById(id: string, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry> | Promise<Nullable<CommonCountry>>;288    commonDeleteCountries(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonCountry>[] | Promise<Nullable<CommonCountry>[]>;289    commonCreateLang(payload: CommonCreateLangInput): Nullable<CommonLang> | Promise<Nullable<CommonLang>>;290    commonCreateLangs(payload: Nullable<CommonCreateLangInput>[]): boolean | Promise<boolean>;291    commonUpdateLangById(payload: CommonUpdateLangByIdInput, constraint?: Nullable<QueryStatement>): Nullable<CommonLang> | Promise<Nullable<CommonLang>>;292    commonUpdateLangs(payload: CommonUpdateLangsInput, query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonLang>[] | Promise<Nullable<CommonLang>[]>;293    commonDeleteLangById(id: string, constraint?: Nullable<QueryStatement>): Nullable<CommonLang> | Promise<Nullable<CommonLang>>;294    commonDeleteLangs(query?: Nullable<QueryStatement>, constraint?: Nullable<QueryStatement>): Nullable<CommonLang>[] | Promise<Nullable<CommonLang>[]>;295}296export interface CommonAdministrativeAreaLevel2 {297    id: string;298    countryId: string;299    country?: Nullable<CommonCountry>;300    administrativeAreaLevel1Id: string;301    administrativeAreaLevel1?: Nullable<CommonAdministrativeAreaLevel1>;302    code: GraphQLString;303    customCode?: Nullable<GraphQLString>;304    name: GraphQLString;305    slug: GraphQLString;306    latitude?: Nullable<GraphQLFloat>;307    longitude?: Nullable<GraphQLFloat>;308    zoom?: Nullable<GraphQLInt>;309    createdAt?: Nullable<GraphQLTimestamp>;310    updatedAt?: Nullable<GraphQLTimestamp>;311    deletedAt?: Nullable<GraphQLTimestamp>;312}313export interface CommonAdministrativeAreaLevel3 {314    id: string;315    countryId: string;316    country?: Nullable<CommonCountry>;317    administrativeAreaLevel1Id: string;318    administrativeAreaLevel1?: Nullable<CommonAdministrativeAreaLevel1>;319    administrativeAreaLevel2Id: string;320    administrativeAreaLevel2?: Nullable<CommonAdministrativeAreaLevel2>;321    code: GraphQLString;322    customCode?: Nullable<GraphQLString>;323    name: GraphQLString;324    slug: GraphQLString;325    latitude?: Nullable<GraphQLFloat>;326    longitude?: Nullable<GraphQLFloat>;327    zoom?: Nullable<GraphQLInt>;328    createdAt?: Nullable<GraphQLTimestamp>;329    updatedAt?: Nullable<GraphQLTimestamp>;330    deletedAt?: Nullable<GraphQLTimestamp>;331}332export interface CommonCountry {333    id: string;334    iso3166Alpha2: GraphQLString;335    iso3166Alpha3: GraphQLString;336    iso3166Numeric: GraphQLString;337    customCode?: Nullable<GraphQLString>;338    prefix?: Nullable<GraphQLString>;339    image?: Nullable<GraphQLString>;340    sort?: Nullable<GraphQLInt>;341    administrativeAreas?: Nullable<JSON>;342    latitude?: Nullable<GraphQLFloat>;343    longitude?: Nullable<GraphQLFloat>;344    zoom?: Nullable<GraphQLInt>;345    dataLang?: Nullable<JSON>;346    createdAt?: Nullable<GraphQLTimestamp>;347    updatedAt?: Nullable<GraphQLTimestamp>;348    deletedAt?: Nullable<GraphQLTimestamp>;349    langId: string;350    lang?: Nullable<CommonLang>;351    name: GraphQLString;352    slug: GraphQLString;353    administrativeAreaLevel1?: Nullable<GraphQLString>;354    administrativeAreaLevel2?: Nullable<GraphQLString>;355    administrativeAreaLevel3?: Nullable<GraphQLString>;356}357export interface CommonLang {358    id: string;359    name: GraphQLString;360    image?: Nullable<GraphQLString>;361    iso6392: GraphQLString;362    iso6393: GraphQLString;363    ietf: GraphQLString;364    customCode?: Nullable<GraphQLString>;365    dir: CommonLangDir;366    sort?: Nullable<GraphQLInt>;367    isActive: GraphQLBoolean;368    createdAt?: Nullable<GraphQLTimestamp>;369    updatedAt?: Nullable<GraphQLTimestamp>;370    deletedAt?: Nullable<GraphQLTimestamp>;371}372export interface Pagination {373    total: GraphQLInt;374    count: GraphQLInt;375    rows: Nullable<JSON>[];376}377export type JSON = any;378export type Any = any;379export type Upload = any;380export type GraphQLString = any;381export type GraphQLInt = any;382export type GraphQLFloat = any;383export type GraphQLBoolean = any;384export type GraphQLISODateTime = any;385export type GraphQLTimestamp = any;386export type GraphQLUpload = any;...business.d.ts
Source:business.d.ts  
1/**2 * ä¸å¡ç¸å
³çéç¨ç±»å, inteface3 */4// ======== ä»¥ä¸ query dto ç interface ==============5// æåº6export interface MySortI {7  // * æåºå段 å¯¹è±¡åæ³ eq: 'boy.name' å³ä¸º boy对象çnameåæ®µ, 'name' å³ä¸ºè¯¥å¯¹è±¡çnameåæ®µ8  prop: string;9  // * æåºç±»å asc ååº desc éåº ä¸åºå大å°å10  dir: string;11}12// å页13export interface MyPageI {14  pageNum: number; // ä¹åæ¯ page15  pageSize: number;16}17// å个æ¥è¯¢æ¡ä»¶18export interface MyQueryDtoI {19  param: string;20  type: string;21  value?: (string | number | undefined)[];22}23// å¯¼åº excel ç dto24export interface ExportExcelDtoI {25  fileName: string;26  sheetName: string;27  ifShowTotal?: boolean;28  listDataColumn: ExportColumnTypeI[];29}30// æ¥è¯¢åæ°31export interface HqlQueryDtoI {32  hqlPageAndSortSumDto: {33    ifCustomHql?: boolean; // é»è®¤ true34    sorts?: MySort[];35    // ä¸ä¼ å页ï¼è·åææ36    page?: Nullable<MyPageI>;37    // æ¥è¯¢æ¡ä»¶38    queryList: MyQueryDtoI[];39    // è¦å计çåæ®µ40    sumList?: string[];41    // 表å42    dataFieldList: string[];43    // å¯¼åº excel44    exportExcelDto?: ExportExcelDtoI;45  };46}47// æ¥è¯¢åæ°48export interface SqlQueryDtoI {49  sqlPageAndSortSumDto: {50    ifCustomSql?: boolean; // é»è®¤ true51    sorts?: MySort[];52    // ä¸ä¼ å页ï¼è·åææ53    page?: Nullable<MyPageI>;54    // æ¥è¯¢æ¡ä»¶55    queryList: MyQueryDtoI[];56    // è¦å计çåæ®µ57    sumList?: string[];58    // 表åï¼å¯ä»¥ç©º59    dataFieldList?: string[];60  };61}62// ======== ä»¥ä¸ å页æ¥å£è¿åç interface ==============63// è¿åç»æçåé¡µç»æ64export interface MyPageInfo<T> {65  content: T[];66  totalElementAmount?: number;67  [key: string]: any;68}69// è¿å ç»æ ç»æ70export interface HqlRespI<T> {71  // å计 map72  mapListSumAmount?: { [key: string]: number };73  page: MyPageInfo<T>;74  [key: string]: any;75}76export interface ParentMenu<T> {77  // å计 map78  id?: number;79}80// å个èå81export interface MenuObj {82  component: string;83  hidden: boolean;84  ifShowDigitalReminder: number;85  menuOrder: number;86  menuType: number;87  parentMenu: ParentMenu<T> | null;88  path: string;89  shiroKey: string;90  tagModule: number | null;91  title: string;92  useMark: number;93}94/**95 * 导åºåç interface96 */97export interface ExportColumnTypeI {98  // { dataName: 'proName', dataType: 'String', dataTitle: '项ç®åç§°', width: 3000 },99  dataName: string;100  dataType: 'String' | 'BigDecimal' | 'Date' | 'DateTime';101  dataTitle: string;102  width: number;103}104// æ æ®µ105export interface BidSectionI {106  id?: Nullable<number>;107  project?: ProjectI;108  sort?: Nullable<number>;109  proName?: Nullable<string>;110  organizationalForm?: DictionaryI;111  procurementMethod?: DictionaryI;112  quoteEndTime?: Nullable<number | string | Date>;113  proNumber?: Nullable<string>;114  budgetAmount?: Nullable<number>;115  bidWinningAmount?: Nullable<number>;116  biddingCompany?: any;117  ifUploadProcurementDocuments?: Nullable<number>;118  status?: DictionaryI;119  processId?: Nullable<string>;120  participants?: Nullable<string>;121  ifAbandonedBid?: Nullable<number>;122  resultNotice?: Nullable<string>;123  resultNoticeUrl?: Nullable<string>;124  upLoader?: Nullable<number>;125  ifDelete?: Nullable<number>;126  addDateTime?: Nullable<number | string | Date>;127  updateDateTime?: Nullable<number | string | Date>;128  verificateeInformation?: Nullable<string>;129  remainingAmount?: Nullable<number>;130  bidWinner?: any;131  [key: string]: any;132}133// 项ç®134export interface ProjectI {135  id?: Nullable<number>;136  proName?: Nullable<string>;137  purchaseNumber?: Nullable<string>;138  serviceContent?: Nullable<string>;139  servicePeriod?: Nullable<number>;140  countryOfOrigin?: Nullable<string>;141  budgetAmount?: Nullable<number>;142  fundsCategoryId?: Nullable<number>;143  fundsDepId?: Nullable<number>;144  fundsUserId?: Nullable<number>;145  relevantDepId?: Nullable<number>;146  relevantUserId?: Nullable<number>;147  natureFunds?: any;148  sourceFunds?: any;149  engineeringProperties?: any;150  useDirection?: any;151  planUseTime?: Nullable<number | string | Date>;152  planPurchaseTime?: Nullable<number | string | Date>;153  projectType?: any;154  ifGovProcurement?: Nullable<number>;155  ifLargeEquipment?: Nullable<number>;156  ifImportedEquipment?: Nullable<number>;157  ifSingleSource?: Nullable<number>;158  proposedTransactionUnit?: Nullable<string>;159  proChargeDepId?: Nullable<number>;160  proChargeUserId?: Nullable<number>;161  biddingDepartmentId?: Nullable<number>;162  BiddingUserId?: Nullable<number>;163  assignorUserId?: Nullable<number>;164  projectOverview?: Nullable<string>;165  initiationDate?: Nullable<number | string | Date>;166  initiationMethod?: Nullable<string>;167  otherInitiationMethod?: Nullable<string>;168  projectDesc?: Nullable<string>;169  intentionPublicEndTime?: Nullable<number | string | Date>;170  declareDept?: any;171  addUser?: any;172  currencyType?: any;173  bidWinningAmount?: Nullable<number>;174  projectAdditionPhase?: Nullable<number>;175  mainFunctionalObjectives?: Nullable<string>;176  basicRequirements?: Nullable<string>;177  qualityRequirements?: Nullable<string>;178  serviceRequirements?: Nullable<string>;179  safetyRequirements?: Nullable<string>;180  timeLimitRequirements?: Nullable<string>;181  status?: DictionaryI;182  ifMultiBidSection?: Nullable<number>;183  multiBidSectionAdditionPhase?: Nullable<number>;184  biddingCompanyId?: Nullable<number>;185  planOrganizationalForm?: Nullable<DictionaryI>;186  organizationalForm?: Nullable<DictionaryI>;187  planProcurementMethod?: Nullable<DictionaryI>;188  procurementMethod?: Nullable<DictionaryI>;189  decentralizedPurchaseMethod?: Nullable<number>;190  releaseDate?: Nullable<number | string | Date>;191  quoteStartTime?: Nullable<number | string | Date>;192  quoteEndTime?: Nullable<number | string | Date>;193  quaRequire?: Nullable<string>;194  remark?: Nullable<string>;195  processId?: Nullable<string>;196  ifDelete?: Nullable<number>;197  addDateTime?: Nullable<number | string | Date>;198  updateDateTime?: Nullable<number | string | Date>;199  dateOfDelivery?: Nullable<string>;200  verificateFailedMsg?: Nullable<string>;201  auditRecords?: any;202  proReviewNode?: any;203  ifInitiateMethodAttachment?: Nullable<number>;204  ProjectTypeId?: Nullable<number>;205  fundsUserIdMsg?: Nullable<string>;206  relevantUserIdMsg?: Nullable<string>;207  ifHandle?: Nullable<number>;208  [key: string]: any;209}210// åå
¸211export interface DictionaryI {212  id?: number;213  parentId?: Nullable<number>;214  name?: Nullable<string>;215  code?: Nullable<string>;216  addDateTime?: Nullable<number | string | Date>;217  updateDateTime?: Nullable<number | string | Date>;218  ifDelete?: Nullable<number>;219  sort?: Nullable<number>;220  node?: Nullable<string>;221  useMark?: Nullable<number>;222  menuNumber?: Nullable<number>;223  [key: string]: any;224}225// éç¥226export interface NoticeI {227  id?: number;228  title?: string;229  content?: Nullable<string>;230  systemModule?: Nullable<number>;231  role?: Nullable<number>;232  viewingTimes?: Nullable<number>;233  ifIndexShow?: Nullable<number>;234  pic?: Nullable<string>;235  addUserId?: any;236  addDateTime?: Nullable<number | string | Date>;237  ifDelete?: Nullable<number>;238  useMark?: Nullable<number>;239  updateDateTime?: Nullable<number | string | Date>;240  [key: string]: any;241}242export interface UserI {243  id?: number;244  orgId?: Nullable<number>;245  orgName?: Nullable<string>;246  department?: Nullable<DepartmentI>;247  account?: Nullable<string>;248  password?: Nullable<string>;249  perName?: Nullable<string>;250  sexCode?: Nullable<number>;251  mobile?: Nullable<string>;252  citId?: Nullable<string>;253  ifDepHead?: Nullable<number>;254  ifChargeDirector?: Nullable<number>;255  ifChargeLeader?: Nullable<number>;256  ifFullAccess?: Nullable<number>;257  pic?: Nullable<string>;258  skin?: Nullable<string>;259  signature?: Nullable<string>;260  openId?: Nullable<string>;261  unionId?: Nullable<string>;262  roleIds?: Nullable<string>;263  role?: Nullable<number>;264  ifSchoolExpert?: Nullable<number>;265  approveStatus?: Nullable<number>;266  authorizeDepIds?: Nullable<string>;267  processAuthorizeDepIds?: Nullable<string>;268  lastLogin?: Nullable<number | string | Date>;269  addDateTime?: Nullable<number | string | Date>;270  ifDelete?: Nullable<number>;271  useMark?: Nullable<number>;272  sessionId?: Nullable<string>;273  systemType?: Nullable<number>;274  roleCode?: Nullable<string>;275  depId?: Nullable<number>;276  depName?: Nullable<string>;277  researchAreaNames?: Nullable<string>;278  ifSupplier?: Nullable<number>;279  ifRepairer?: Nullable<number>;280  companyName?: Nullable<string>;281  approveSuggestion?: Nullable<string>;282  [key: string]: any;283}284export interface DepartmentI {285  id?: number;286  name?: Nullable<string>;287  attribute?: Nullable<DictionaryI>;288  code?: Nullable<string>;289  parent?: any;290  organization?: any;291  ifCentralized?: Nullable<number>;292  ifMgt?: Nullable<number>;293  ifAccounting?: Nullable<number>;294  ifDirector?: Nullable<number>;295  ifControl?: Nullable<number>;296  ifPurOrg?: Nullable<number>; // æ¯å¦ç»ç»é¨é¨297  ifConDirector?: Nullable<number>;298  ifDelete?: Nullable<number>;299  useMark?: Nullable<number>;300  addDateTime?: Nullable<number | string | Date>;301  updateDateTime?: Nullable<number | string | Date>;302  parentId?: Nullable<number>;303  [key: string]: any;304}305export interface ProcessWaitDealI {306  ID_?: string;307  REV_?: number;308  EXECUTION_ID_?: string;309  PROC_INST_ID_?: string;310  PROC_DEF_ID_?: string;311  TASK_DEF_ID_?: any;312  SCOPE_ID_?: any;313  SUB_SCOPE_ID_?: any;314  SCOPE_TYPE_?: any;315  SCOPE_DEFINITION_ID_?: any;316  PROPAGATED_STAGE_INST_ID_?: any;317  NAME_?: string;318  PARENT_TASK_ID_?: any;319  DESCRIPTION_?: any;320  TASK_DEF_KEY_?: string;321  OWNER_?: any;322  ASSIGNEE_?: string;323  DELEGATION_?: any;324  PRIORITY_?: number;325  CREATE_TIME_?: string;326  DUE_DATE_?: any;327  CATEGORY_?: any;328  SUSPENSION_STATE_?: number;329  TENANT_ID_?: string;330  FORM_KEY_?: any;331  CLAIM_TIME_?: any;332  IS_COUNT_ENABLED_?: number;333  VAR_COUNT_?: number;334  ID_LINK_COUNT_?: number;335  SUB_TASK_COUNT_?: number;336  IF_POSTPONEMENT?: number;337  PNAME_?: string;338  DEPLOYMENT_ID_?: string;339  DGRM_RESOURCE_NAME_?: string;340  processObjectName?: string;341  processObjectCode?: string;342  applyObjectType?: '' | '' | '';343  organizationalFormName?: any;344  procurementMethodName?: any;345  amount?: string;346  projectCategoryName?: any;347  processObjectId?: string;348  proCode?: any;349  addDepId?: string;350  addDepName?: string;351  INITATOR?: string;352  processDescription?: string;353  currencyTypeName?: string;354  planUseTime?: string;355  addUserPerName?: string;356  addUserMobile?: string;357  addDateTime?: string;358  code?: string;359  perName?: string;360  tagModuleId?: string;361  [key: string]: any;362}363export interface ProcessAlreadyDoneI {364  ID_?: string;365  REV_?: number;366  PROC_DEF_ID_?: string;367  TASK_DEF_ID_?: any;368  TASK_DEF_KEY_?: string;369  PROC_INST_ID_?: string;370  EXECUTION_ID_?: string;371  SCOPE_ID_?: any;372  SUB_SCOPE_ID_?: any;373  SCOPE_TYPE_?: any;374  SCOPE_DEFINITION_ID_?: any;375  PROPAGATED_STAGE_INST_ID_?: any;376  NAME_?: string;377  PARENT_TASK_ID_?: any;378  DESCRIPTION_?: any;379  OWNER_?: any;380  ASSIGNEE_?: string;381  START_TIME_?: string;382  CLAIM_TIME_?: any;383  END_TIME_?: string;384  DURATION_?: number;385  DELETE_REASON_?: any;386  PRIORITY_?: number;387  DUE_DATE_?: any;388  FORM_KEY_?: any;389  CATEGORY_?: any;390  TENANT_ID_?: string;391  LAST_UPDATED_TIME_?: string;392  PNAME_?: string;393  DEPLOYMENT_ID_?: string;394  DGRM_RESOURCE_NAME_?: string;395  processObjectName?: string;396  processObjectCode?: string;397  applyObjectType?: string;398  organizationalFormName?: any;399  procurementMethodName?: any;400  amount?: string;401  projectCategoryName?: any;402  processObjectId?: string;403  proCode?: any;404  addDepId?: string;405  addDepName?: string;406  processDescription?: string;407  currencyTypeName?: string;408  planUseTime?: string;409  addUserPerName?: string;410  addUserMobile?: string;411  addDateTime?: string;412  code?: any;413  INITATOR?: string;414  perName?: string;415  tagModuleId?: string;416  [key: string]: any;417}418/**419 * ä¸è½½æä»¶ç±»å420 */421export interface FileI {422  id?: Nullable<number>;423  objectId?: Nullable<number>;424  objectName?: Nullable<string>;425  fileTypeId?: Nullable<number>;426  name?: Nullable<string>;427  url?: Nullable<string>;428  size?: Nullable<number>;429  addUserId?: Nullable<number>;430  fileExplain?: Nullable<string>;431  addDateTime?: Nullable<number | string | Date>;432  updateDateTime?: Nullable<number | string | Date>;433  ifDelete?: Nullable<number>;434  [key: string]: any;435}436export interface CommonFileI {437  id?: Nullable<number>;438  name: string;439  downloadType?: any;440  attach?: Nullable<string>;441  role?: Nullable<number>;442  addDateTime?: Nullable<number | string | Date>;443  updateDateTime?: Nullable<number | string | Date>;444  ifDelete?: Nullable<number>;445  useMark?: Nullable<number>;446  downloadAmount?: Nullable<number>;447  systemModule?: Nullable<number>;448  [key: string]: any;449}450export interface NoticeI {451  id?: Nullable<number>;452  title?: Nullable<string>;453  content?: Nullable<string>;454  systemModule?: Nullable<number>;455  role?: Nullable<number>;456  viewingTimes?: Nullable<number>;457  ifIndexShow?: Nullable<number>;458  pic?: Nullable<string>;459  addUserId?: any;460  addDateTime?: Nullable<number | string | Date>;461  ifDelete?: Nullable<number>;462  useMark?: Nullable<number>;463  updateDateTime?: Nullable<number | string | Date>;464  [key: string]: any;465}466// æçä¸å¡ interfce467export interface MyBusinessItemI {468  addDateTime: number;469  amount: Nullable<number>;470  currencyTypeName: string;471  id: number;472  name: string;473  objNumber: string;474  statusName: string;475  type: string;476  [key: string]: any;...702d6ee9b14f_compact_all_migrations.py
Source:702d6ee9b14f_compact_all_migrations.py  
1"""compact all migrations2Revision ID: 702d6ee9b14f3Revises:4Create Date: 2020-09-21 21:11:08.8547925"""6from alembic import op7import sqlalchemy as sa8# revision identifiers, used by Alembic.9revision = "702d6ee9b14f"10down_revision = None11branch_labels = None12depends_on = None13def upgrade():14    conn = op.get_bind()15    inspector = sa.inspect(conn)16    tables = inspector.get_table_names()17    if "choice_group" not in tables:18        op.create_table(19            "choice_group",20            sa.Column("id", sa.Integer(), nullable=False),21            sa.Column("created_at", sa.DateTime(), nullable=True),22            sa.Column("title", sa.String(), nullable=True),23            sa.PrimaryKeyConstraint("id"),24        )25    if "company" not in tables:26        op.create_table(27            "company",28            sa.Column("id", sa.Integer(), nullable=False),29            sa.Column("created_at", sa.DateTime(), nullable=True),30            sa.Column("name", sa.String(), nullable=True),31            sa.Column("slogan", sa.String(), nullable=True),32            sa.Column("logo_src", sa.String(), nullable=True),33            sa.PrimaryKeyConstraint("id"),34        )35    if "email_template" not in tables:36        op.create_table(37            "email_template",38            sa.Column("id", sa.Integer(), nullable=False),39            sa.Column("custom_welcome_email_template", sa.String(), nullable=True),40            sa.Column("use_custom_welcome_email", sa.Boolean(), nullable=True),41            sa.PrimaryKeyConstraint("id"),42        )43    if "integration" not in tables:44        op.create_table(45            "integration",46            sa.Column("id", sa.Integer(), nullable=False),47            sa.Column("created_at", sa.DateTime(), nullable=True),48            sa.Column("google_tag_manager_active", sa.Boolean(), nullable=True),49            sa.Column("google_tag_manager_container_id", sa.String(), nullable=True),50            sa.Column("tawk_active", sa.Boolean(), nullable=True),51            sa.Column("tawk_property_id", sa.String(), nullable=True),52            sa.PrimaryKeyConstraint("id"),53        )54    if "module" not in tables:55        op.create_table(56            "module",57            sa.Column("id", sa.Integer(), nullable=False),58            sa.Column("created_at", sa.DateTime(), nullable=True),59            sa.Column("name", sa.String(), nullable=True),60            sa.Column("src", sa.String(), nullable=True),61            sa.PrimaryKeyConstraint("id"),62        )63    if "module_seo_page_title" not in tables:64        op.create_table(65            "module_seo_page_title",66            sa.Column("path", sa.String(), nullable=False),67            sa.Column("title", sa.String(), nullable=True),68            sa.PrimaryKeyConstraint("path"),69        )70    if "module_style" not in tables:71        op.create_table(72            "module_style",73            sa.Column("id", sa.Integer(), nullable=False),74            sa.Column("created_at", sa.DateTime(), nullable=True),75            sa.Column("css", sa.String(), nullable=True),76            sa.PrimaryKeyConstraint("id"),77        )78    if "page" not in tables:79        op.create_table(80            "page",81            sa.Column("id", sa.Integer(), nullable=False),82            sa.Column("created_at", sa.DateTime(), nullable=True),83            sa.Column("page_name", sa.String(), nullable=True),84            sa.Column("path", sa.String(), nullable=True),85            sa.Column("template_file", sa.String(), nullable=True),86            sa.PrimaryKeyConstraint("id"),87        )88    if "payment_provider" not in tables:89        op.create_table(90            "payment_provider",91            sa.Column("id", sa.Integer(), nullable=False),92            sa.Column("created_at", sa.DateTime(), nullable=True),93            sa.Column("gocardless_active", sa.Boolean(), nullable=True),94            sa.Column("gocardless_access_token", sa.String(), nullable=True),95            sa.Column("gocardless_environment", sa.String(), nullable=True),96            sa.Column("stripe_active", sa.Boolean(), nullable=True),97            sa.Column("stripe_publishable_key", sa.String(), nullable=True),98            sa.Column("stripe_secret_key", sa.String(), nullable=True),99            sa.Column("stripe_webhook_endpoint_secret", sa.String(), nullable=True),100            sa.Column("stripe_webhook_endpoint_id", sa.String(), nullable=True),101            sa.PrimaryKeyConstraint("id"),102        )103    if "person" not in tables:104        op.create_table(105            "person",106            sa.Column("id", sa.Integer(), nullable=False),107            sa.Column("created_at", sa.DateTime(), nullable=True),108            sa.Column("uuid", sa.String(), nullable=True),109            sa.Column("sid", sa.String(), nullable=True),110            sa.Column("ts", sa.DateTime(), nullable=True),111            sa.Column("given_name", sa.String(), nullable=True),112            sa.Column("family_name", sa.String(), nullable=True),113            sa.Column("address_line1", sa.String(), nullable=True),114            sa.Column("city", sa.String(), nullable=True),115            sa.Column("postal_code", sa.String(), nullable=True),116            sa.Column("email", sa.String(), nullable=True),117            sa.Column("password", sa.String(), nullable=True),118            sa.Column("password_reset_string", sa.String(), nullable=True),119            sa.Column("mobile", sa.String(), nullable=True),120            sa.PrimaryKeyConstraint("id"),121        )122    if "plan" not in tables:123        op.create_table(124            "plan",125            sa.Column("id", sa.Integer(), nullable=False),126            sa.Column("created_at", sa.DateTime(), nullable=True),127            sa.Column("archived", sa.Boolean(), nullable=True),128            sa.Column("uuid", sa.String(), nullable=True),129            sa.Column("title", sa.String(), nullable=True),130            sa.Column("interval_unit", sa.String(), nullable=True),131            sa.Column("interval_amount", sa.Integer(), nullable=True),132            sa.Column("monthly_price", sa.Integer(), nullable=True),133            sa.Column("sell_price", sa.Integer(), nullable=True),134            sa.Column("days_before_first_charge", sa.Integer(), nullable=True),135            sa.Column("primary_icon", sa.String(), nullable=True),136            sa.Column("position", sa.Integer(), nullable=True),137            sa.PrimaryKeyConstraint("id"),138        )139    if "setting" not in tables:140        op.create_table(141            "setting",142            sa.Column("id", sa.Integer(), nullable=False),143            sa.Column("reply_to_email_address", sa.String(), nullable=True),144            sa.PrimaryKeyConstraint("id"),145        )146    if "user" not in tables:147        op.create_table(148            "user",149            sa.Column("id", sa.Integer(), nullable=False),150            sa.Column("email", sa.String(), nullable=True),151            sa.Column("password", sa.String(), nullable=True),152            sa.Column("created_at", sa.DateTime(), nullable=True),153            sa.Column("active", sa.String(), nullable=True),154            sa.Column("login_token", sa.String(), nullable=True),155            sa.Column("password_reset_string", sa.String(), nullable=True),156            sa.PrimaryKeyConstraint("id"),157        )158    if "option" not in tables:159        op.create_table(160            "option",161            sa.Column("id", sa.Integer(), nullable=False),162            sa.Column("choice_group_id", sa.Integer(), nullable=True),163            sa.Column("created_at", sa.DateTime(), nullable=True),164            sa.Column("title", sa.String(), nullable=True),165            sa.Column("description", sa.Text(), nullable=True),166            sa.Column("primary_icon", sa.String(), nullable=True),167            sa.ForeignKeyConstraint(168                ["choice_group_id"],169                ["choice_group.id"],170            ),171            sa.PrimaryKeyConstraint("id"),172        )173    if "plan_choice_group" not in tables:174        op.create_table(175            "plan_choice_group",176            sa.Column("choice_group_id", sa.Integer(), nullable=True),177            sa.Column("plan_id", sa.Integer(), nullable=True),178            sa.ForeignKeyConstraint(179                ["choice_group_id"],180                ["choice_group.id"],181            ),182            sa.ForeignKeyConstraint(183                ["plan_id"],184                ["plan.id"],185            ),186        )187    if "plan_requirements" not in tables:188        op.create_table(189            "plan_requirements",190            sa.Column("id", sa.Integer(), nullable=False),191            sa.Column("created_at", sa.DateTime(), nullable=True),192            sa.Column("plan_id", sa.Integer(), nullable=True),193            sa.Column("instant_payment", sa.Boolean(), nullable=True),194            sa.Column("subscription", sa.Boolean(), nullable=True),195            sa.Column("note_to_seller_required", sa.Boolean(), nullable=True),196            sa.Column("note_to_buyer_message", sa.String(), nullable=True),197            sa.ForeignKeyConstraint(198                ["plan_id"],199                ["plan.id"],200            ),201            sa.PrimaryKeyConstraint("id"),202        )203    if "plan_selling_points" not in tables:204        op.create_table(205            "plan_selling_points",206            sa.Column("id", sa.Integer(), nullable=False),207            sa.Column("created_at", sa.DateTime(), nullable=True),208            sa.Column("point", sa.String(), nullable=True),209            sa.Column("plan_id", sa.Integer(), nullable=True),210            sa.ForeignKeyConstraint(211                ["plan_id"],212                ["plan.id"],213            ),214            sa.PrimaryKeyConstraint("id"),215        )216    if "subscription" not in tables:217        op.create_table(218            "subscription",219            sa.Column("id", sa.Integer(), nullable=False),220            sa.Column("uuid", sa.String(), nullable=True),221            sa.Column("sku_uuid", sa.String(), nullable=True),222            sa.Column("gocardless_subscription_id", sa.String(), nullable=True),223            sa.Column("person_id", sa.Integer(), nullable=True),224            sa.Column("created_at", sa.DateTime(), nullable=True),225            sa.ForeignKeyConstraint(226                ["person_id"],227                ["person.id"],228            ),229            sa.PrimaryKeyConstraint("id"),230        )231    if "chosen_option" not in tables:232        op.create_table(233            "chosen_option",234            sa.Column("id", sa.Integer(), nullable=False),235            sa.Column("created_at", sa.DateTime(), nullable=True),236            sa.Column("choice_group_id", sa.Integer(), nullable=True),237            sa.Column("choice_group_title", sa.String(), nullable=True),238            sa.Column("option_title", sa.String(), nullable=True),239            sa.Column("subscription_id", sa.Integer(), nullable=True),240            sa.ForeignKeyConstraint(241                ["subscription_id"],242                ["subscription.id"],243            ),244            sa.PrimaryKeyConstraint("id"),245        )246    if "subscription_note" not in tables:247        op.create_table(248            "subscription_note",249            sa.Column("id", sa.Integer(), nullable=False),250            sa.Column("created_at", sa.DateTime(), nullable=True),251            sa.Column("note", sa.String(), nullable=True),252            sa.Column("subscription_id", sa.Integer(), nullable=True),253            sa.ForeignKeyConstraint(254                ["subscription_id"],255                ["subscription.id"],256            ),257            sa.PrimaryKeyConstraint("id"),258        )259    if "transactions" not in tables:260        op.create_table(261            "transactions",262            sa.Column("id", sa.Integer(), nullable=False),263            sa.Column("created_at", sa.DateTime(), nullable=True),264            sa.Column("uuid", sa.String(), nullable=True),265            sa.Column("amount", sa.Integer(), nullable=True),266            sa.Column("comment", sa.Text(), nullable=True),267            sa.Column("external_id", sa.String(), nullable=True),268            sa.Column("external_src", sa.String(), nullable=True),269            sa.Column("person_id", sa.Integer(), nullable=True),270            sa.Column("subscription_id", sa.Integer(), nullable=True),271            sa.Column("payment_status", sa.String(), nullable=True),272            sa.Column("fulfillment_state", sa.String(), nullable=True),273            sa.ForeignKeyConstraint(274                ["person_id"],275                ["person.id"],276            ),277            sa.ForeignKeyConstraint(278                ["subscription_id"],279                ["subscription.id"],280            ),281            sa.PrimaryKeyConstraint("id"),282        )283def downgrade():...schema.js
Source:schema.js  
1var db = {2        posts: {3            id: {type: 'increments', nullable: false, primary: true},4            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},5            title: {type: 'string', maxlength: 150, nullable: false},6            slug: {type: 'string', maxlength: 150, nullable: false, unique: true},7            markdown: {type: 'text', maxlength: 16777215, fieldtype: 'medium', nullable: true},8            html: {type: 'text', maxlength: 16777215, fieldtype: 'medium', nullable: true},9            image: {type: 'text', maxlength: 2000, nullable: true},10            featured: {type: 'bool', nullable: false, defaultTo: false, validations: {isIn: [[0, 1, false, true]]}},11            page: {type: 'bool', nullable: false, defaultTo: false, validations: {isIn: [[0, 1, false, true]]}},12            status: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'draft'},13            language: {type: 'string', maxlength: 6, nullable: false, defaultTo: 'en_US'},14            meta_title: {type: 'string', maxlength: 150, nullable: true},15            meta_description: {type: 'string', maxlength: 200, nullable: true},16            author_id: {type: 'integer', nullable: false},17            created_at: {type: 'dateTime', nullable: false},18            created_by: {type: 'integer', nullable: false},19            updated_at: {type: 'dateTime', nullable: true},20            updated_by: {type: 'integer', nullable: true},21            published_at: {type: 'dateTime', nullable: true},22            published_by: {type: 'integer', nullable: true}23        },24        users: {25            id: {type: 'increments', nullable: false, primary: true},26            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},27            name: {type: 'string', maxlength: 150, nullable: false},28            slug: {type: 'string', maxlength: 150, nullable: false, unique: true},29            password: {type: 'string', maxlength: 60, nullable: false},30            email: {type: 'string', maxlength: 254, nullable: false, unique: true, validations: {isEmail: true}},31            image: {type: 'text', maxlength: 2000, nullable: true},32            cover: {type: 'text', maxlength: 2000, nullable: true},33            bio: {type: 'string', maxlength: 200, nullable: true},34            website: {type: 'text', maxlength: 2000, nullable: true, validations: {isEmptyOrURL: true}},35            location: {type: 'text', maxlength: 65535, nullable: true},36            accessibility: {type: 'text', maxlength: 65535, nullable: true},37            status: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'active'},38            language: {type: 'string', maxlength: 6, nullable: false, defaultTo: 'en_US'},39            meta_title: {type: 'string', maxlength: 150, nullable: true},40            meta_description: {type: 'string', maxlength: 200, nullable: true},41            last_login: {type: 'dateTime', nullable: true},42            created_at: {type: 'dateTime', nullable: false},43            created_by: {type: 'integer', nullable: false},44            updated_at: {type: 'dateTime', nullable: true},45            updated_by: {type: 'integer', nullable: true}46        },47        roles: {48            id: {type: 'increments', nullable: false, primary: true},49            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},50            name: {type: 'string', maxlength: 150, nullable: false},51            description: {type: 'string', maxlength: 200, nullable: true},52            created_at: {type: 'dateTime',  nullable: false},53            created_by: {type: 'integer',  nullable: false},54            updated_at: {type: 'dateTime',  nullable: true},55            updated_by: {type: 'integer',  nullable: true}56        },57        roles_users: {58            id: {type: 'increments', nullable: false, primary: true},59            role_id: {type: 'integer', nullable: false},60            user_id: {type: 'integer', nullable: false}61        },62        permissions: {63            id: {type: 'increments', nullable: false, primary: true},64            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},65            name: {type: 'string', maxlength: 150, nullable: false},66            object_type: {type: 'string', maxlength: 150, nullable: false},67            action_type: {type: 'string', maxlength: 150, nullable: false},68            object_id: {type: 'integer', nullable: true},69            created_at: {type: 'dateTime', nullable: false},70            created_by: {type: 'integer', nullable: false},71            updated_at: {type: 'dateTime', nullable: true},72            updated_by: {type: 'integer', nullable: true}73        },74        permissions_users: {75            id: {type: 'increments', nullable: false, primary: true},76            user_id: {type: 'integer', nullable: false},77            permission_id: {type: 'integer', nullable: false}78        },79        permissions_roles: {80            id: {type: 'increments', nullable: false, primary: true},81            role_id: {type: 'integer', nullable: false},82            permission_id: {type: 'integer', nullable: false}83        },84        permissions_apps: {85            id: {type: 'increments', nullable: false, primary: true},86            app_id: {type: 'integer', nullable: false},87            permission_id: {type: 'integer', nullable: false}88        },89        settings: {90            id: {type: 'increments', nullable: false, primary: true},91            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},92            key: {type: 'string', maxlength: 150, nullable: false, unique: true},93            value: {type: 'text', maxlength: 65535, nullable: true},94            type: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'core', validations: {isIn: [['core', 'blog', 'theme', 'app', 'plugin']]}},95            created_at: {type: 'dateTime', nullable: false},96            created_by: {type: 'integer', nullable: false},97            updated_at: {type: 'dateTime', nullable: true},98            updated_by: {type: 'integer', nullable: true}99        },100        tags: {101            id: {type: 'increments', nullable: false, primary: true},102            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},103            name: {type: 'string', maxlength: 150, nullable: false},104            slug: {type: 'string', maxlength: 150, nullable: false, unique: true},105            description: {type: 'string', maxlength: 200, nullable: true},106            image: {type: 'text', maxlength: 2000, nullable: true},107            hidden: {type: 'bool', nullable: false, defaultTo: false, validations: {isIn: [[0, 1, false, true]]}},108            parent_id: {type: 'integer', nullable: true},109            meta_title: {type: 'string', maxlength: 150, nullable: true},110            meta_description: {type: 'string', maxlength: 200, nullable: true},111            created_at: {type: 'dateTime', nullable: false},112            created_by: {type: 'integer', nullable: false},113            updated_at: {type: 'dateTime', nullable: true},114            updated_by: {type: 'integer', nullable: true}115        },116        posts_tags: {117            id: {type: 'increments', nullable: false, primary: true},118            post_id: {type: 'integer', nullable: false, unsigned: true, references: 'posts.id'},119            tag_id: {type: 'integer', nullable: false, unsigned: true, references: 'tags.id'}120        },121        apps: {122            id: {type: 'increments', nullable: false, primary: true},123            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},124            name: {type: 'string', maxlength: 150, nullable: false, unique: true},125            slug: {type: 'string', maxlength: 150, nullable: false, unique: true},126            version: {type: 'string', maxlength: 150, nullable: false},127            status: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'inactive'},128            created_at: {type: 'dateTime', nullable: false},129            created_by: {type: 'integer', nullable: false},130            updated_at: {type: 'dateTime', nullable: true},131            updated_by: {type: 'integer', nullable: true}132        },133        app_settings: {134            id: {type: 'increments', nullable: false, primary: true},135            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},136            key: {type: 'string', maxlength: 150, nullable: false, unique: true},137            value: {type: 'text', maxlength: 65535, nullable: true},138            app_id: {type: 'integer', nullable: false, unsigned: true, references: 'apps.id'},139            created_at: {type: 'dateTime', nullable: false},140            created_by: {type: 'integer', nullable: false},141            updated_at: {type: 'dateTime', nullable: true},142            updated_by: {type: 'integer', nullable: true}143        },144        app_fields: {145            id: {type: 'increments', nullable: false, primary: true},146            uuid: {type: 'string', maxlength: 36, nullable: false, validations: {isUUID: true}},147            key: {type: 'string', maxlength: 150, nullable: false},148            value: {type: 'text', maxlength: 65535, nullable: true},149            type: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'html'},150            app_id: {type: 'integer', nullable: false, unsigned: true, references: 'apps.id'},151            relatable_id: {type: 'integer', nullable: false, unsigned: true},152            relatable_type: {type: 'string', maxlength: 150, nullable: false, defaultTo: 'posts'},153            active: {type: 'bool', nullable: false, defaultTo: true, validations: {isIn: [[0, 1, false, true]]}},154            created_at: {type: 'dateTime', nullable: false},155            created_by: {type: 'integer', nullable: false},156            updated_at: {type: 'dateTime', nullable: true},157            updated_by: {type: 'integer', nullable: true}158        },159        clients: {160            id: {type: 'increments', nullable: false, primary: true},161            uuid: {type: 'string', maxlength: 36, nullable: false},162            name: {type: 'string', maxlength: 150, nullable: false, unique: true},163            slug: {type: 'string', maxlength: 150, nullable: false, unique: true},164            secret: {type: 'string', maxlength: 150, nullable: false, unique: true},165            created_at: {type: 'dateTime', nullable: false},166            created_by: {type: 'integer', nullable: false},167            updated_at: {type: 'dateTime', nullable: true},168            updated_by: {type: 'integer', nullable: true}169        },170        accesstokens: {171            id: {type: 'increments', nullable: false, primary: true},172            token: {type: 'string', nullable: false, unique: true},173            user_id: {type: 'integer', nullable: false, unsigned: true, references: 'users.id'},174            client_id: {type: 'integer', nullable: false, unsigned: true, references: 'clients.id'},175            expires: {type: 'bigInteger', nullable: false}176        },177        refreshtokens: {178            id: {type: 'increments', nullable: false, primary: true},179            token: {type: 'string', nullable: false, unique: true},180            user_id: {type: 'integer', nullable: false, unsigned: true, references: 'users.id'},181            client_id: {type: 'integer', nullable: false, unsigned: true, references: 'clients.id'},182            expires: {type: 'bigInteger', nullable: false}183        }184    };185function isPost(jsonData) {186    return jsonData.hasOwnProperty('html') && jsonData.hasOwnProperty('markdown') &&187           jsonData.hasOwnProperty('title') && jsonData.hasOwnProperty('slug');188}189function isTag(jsonData) {190    return jsonData.hasOwnProperty('name') && jsonData.hasOwnProperty('slug') &&191        jsonData.hasOwnProperty('description') && jsonData.hasOwnProperty('parent');192}193function isUser(jsonData) {194    return jsonData.hasOwnProperty('bio') && jsonData.hasOwnProperty('website') &&195        jsonData.hasOwnProperty('status') && jsonData.hasOwnProperty('location');196}197function isNav(jsonData) {198    return jsonData.hasOwnProperty('label') && jsonData.hasOwnProperty('url') &&199        jsonData.hasOwnProperty('slug') && jsonData.hasOwnProperty('current');200}201module.exports.tables = db;202module.exports.checks = {203    isPost: isPost,204    isTag: isTag,205    isUser: isUser,206    isNav: isNav...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
