Data Types
JitAi's data type Type elements are encapsulations of programming language native data types (such as: strings, numbers, lists, dictionaries, etc.), providing additional functionality and features, frequently used to define field types for Data Models.
The hierarchical structure of data type elements is Meta (datatypes.Meta) → Type (datatypes.xxx). Developers can also create their own Type elements or modify the official data types provided by JitAi in their own App to implement their own encapsulation.
- init parameters: Parameters that can be used in the constructor when constructing objects of a certain data type
- Inheritance relationship: Child data types inherit all init parameters from parent data types
- Parameter override: Child data types can override init parameters from parent data types
- Parameter extension: Child data types can add their own unique init parameters
- Common parameters: All data types have common init parameters by default
Type-Specific Parameters
Each data type has its specific parameter configuration items and usage methods.
Common init Parameters
Basic Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | Field name, used to identify field | |
| title | String | Field title, used for display | |
| parentDt | Object | Parent variable, e.g., in rowData.f1, the parent variable of f1 is rowData | |
| description | String | Field description | |
| placeholder | String | Hint text | |
| value | Any | Initial field value |
Database Related Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| dbIndex | Boolean | False | Whether to create database index |
| primaryKey | Boolean | False | Whether primary key |
| unique | Integer | 0 | Whether unique (1: unique, 0: not unique) |
Permission Control Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| readOnly | Integer | 0 | Whether read-only (1: read-only, 0: read-write) |
| isExtend | Boolean | False | Whether to inherit |
Formula Calculation Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| formula | String | Calculation formula |
Type-Specific Parameters
Stext (Single-line Text)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| limit | Boolean | False | Whether to limit length |
| maxLen | Integer | 255 | Maximum length |
| minLen | Integer | 0 | Minimum length |
Ltext (Multi-line Text)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| limit | Boolean | False | Whether to limit length |
| maxLen | Integer | 1024 | Maximum length |
| minLen | Integer | 0 | Minimum length |
Numeric (Number)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| unit | String | None | Unit |
| decimal | Integer | 0 | Decimal places |
| maxDigits | Integer | 18 | Maximum digits |
Money (Currency)
Inherits: Numeric
Specific Parameters: None
Percent (Percent)
Inherits: Numeric
Parameter Override:
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| unit | String | "%" | Overrides the default value of the parent data type's unit parameter |
RichText (Rich Text)
Specific Parameters: None
AutoInt (Auto Inc Id, usually used as primary key)
Inherits: Numeric
Specific Parameters: None
Serial (Serial Number)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| prefix | String | Prefix | |
| connector | String | Connector, located between prefix and subsequent characters | |
| dateTimeFormat | String | "YYYYMMDD" | Date time format |
| incNum | Integer | 2 | Increment number digits |
| startNumber | Integer | 1 | Starting number (padded with 0 when digits are less than incNum) |
| fieldId | String | Related field ID (specified field value of current model as part of prefix) |
Format Example: <prefix><field_value><connector><date_time><increment_number>
Radio (Single Choice)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| color | Boolean | True | Whether to display color |
| options | List[Dict] | [] | Options list, format: [{"label": "Display text", "value": "value", "style": {"backgroundColor": "color value", "color": "color value"}}] |
| selectionWay | String | "custom" | Selection method (custom: custom selection, field: select field from data table) |
| allowManualInput | Boolean | False | Whether to allow manual input |
| mulLevelSelectionConfig | Dict | Available when selectionWay is field: {"dataSourceModel": "<fullName of data source model>", "matchFieldName": "<value field>", "sortFieldName": "<sort field>", "sortBy": "<sort method 0: descending 1: ascending>", "filterValue": "<filter condition>"} |
MultiRadio (Multiple Choice)
Inherits: Radio
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| maxCount | Integer | None | Maximum selection count |
Dropdown (Single Select)
Inherits: Radio
Specific Parameters: None
MultiDropdown (Multiple Select)
Inherits: MultiRadio
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| limit | Boolean | False | Whether to limit maximum selectable count, maxCount is effective when limit=True |
Checkbox (Checkbox)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| isEnableDescription | Boolean | False | Whether to enable description |
| checkboxDescription | String | Checkbox description | |
| default | Integer | 0 | Whether selected by default (1: selected by default, 0: not selected by default) |
Date (Date)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| dateTimeType | String | Date type, supports: YEAR(year), YEAR_QUARTER(year-quarter), HALF_YEAR(half-year), YEAR_MONTH(year-month), TRUNC_FULLWEEK(year-week-cross-year), YEAR_WEEK(year-week-no-cross-year), YEAR_MONTH_DAY(year-month-day), YEAR_MONTH_DAY_ONE(year-month-day), QUARTER(quarter), MONTH(month), WEEK(week), DAYOFWEEK(day-of-week), DAY(day) | |
| dateTimeFormat | String | null | Date format, e.g.: YYYY-MM-DD |
| createDefault | Boolean | false | Whether to use default value when creating |
| updateDefault | Boolean | false | Whether to use default value when updating |
| autoAssign | String | null | Auto assignment rules |
Datetime (Date Time)
Inherits: Date
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| dateTimeType | String | Date time type, supports: HOUR(hour), MINUTES(minute), SECOND(second) | |
| dateTimeFormat | String | null | Date time format, e.g.: YYYY/MM/DD HH:mm:ss |
Time (Time)
Inherits: Datetime
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| dateTimeFormat | String | null | Time format containing only hours, minutes, seconds, e.g.: HH:mm:ss |
File (Attachments)
Inherits: JitList
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| maxCount | Integer | 5 | Maximum file count |
| maxSize | Integer | 20 | Maximum file size (MB) |
| minSize | Integer | 0 | Minimum file size (MB) |
| acceptTypes | String | Acceptable file types | |
| selectedDown | Boolean | False | Whether download is allowed |
| selectedDelete | Boolean | False | Whether deletion is allowed |
Image (Images)
Inherits: JitList
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| imgType | String | "png" | Image type |
| size | String | "medium" | Image size (big: large image, medium: medium image, small: small image, inlined: inline image, subTable: sub-table) |
| maxCount | Integer | 5 | Maximum image count |
| maxSize | Integer | 20 | Maximum image size (MB) |
| isAddWatermark | Boolean | false | Whether to add watermark |
| isCameraOnly | Boolean | false | Whether camera only |
Signature (Signature)
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| mode | String | "new" | Signature mode (new: sign again each time, prev: use previous signature) |
Dept (Single Department)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| selectionWay | String | custom | Selection method (custom: custom selection, field: select field from data table, currentOrg: can only select current organization) |
| availableDeptId | String | Available department ID | |
| mulLevelSelectionConfig | Dict | Cascade selection configuration {"dataSourceModel": "<fullName of data source model>", "matchFieldName": "<value field>", "sortFieldName": "<sort field>", "sortBy": "<sort method 0: descending 1: ascending>", "filterValue": "<filter condition>"} | |
| availableParentDeptId | String | Available parent department ID | |
| level | Integer | Department level limit |
MultiDept (Multiple Departments)
Inherits: Dept
Specific Parameters: None
Member (Single Member)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| selectionWay | String | custom | Selection method (custom: custom selection, field: select field from data table, currentOrg: can only select current organization) |
| availableUser | Dict | Available user settings {"deptIdList": [], "memberIdList": [], "roleIdList": []} | |
| allowLeave | Integer | 0 | Whether to allow selecting resigned members |
| mulLevelSelectionConfig | Dict | Cascade selection configuration {"dataSourceModel": "<fullName of data source model>", "matchFieldName": "<value field>", "sortFieldName": "<sort field>", "sortBy": "<sort method 0: descending 1: ascending>", "filterValue": "<filter condition>"} | |
| createDefault | Boolean | False | When adding data, automatically set field value to current user |
| updateDefault | Boolean | False | When updating data, automatically set field value to current user |
MultiMember (Multiple Members)
Inherits: Member
Specific Parameters: None
Address (Address)
Inherits: JitDict
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| addressFormat | String | "pca" | City precision (pca: province-city-district, pc: province-city, p: province) |
| detail | Boolean | True | Whether to display detailed address |
Identify (ID Number)
Inherits: Stext
Specific Parameters: None
LicensePlate (License Plate Number)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| maxLen | Integer | 12 | Maximum length |
Phone (Phone Number)
Inherits: Stext
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| rules | String | "eleven" | Phone number rules (eleven: 11 digits, eight: 8 to 11 digits, tel: landline number, mobileOrTel: mobile or landline number) |
Position (Location)
Inherits: Address
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| adjustRange | Integer | 0 | Adjustment range |
| adjustment | Boolean | False | Whether adjustment is allowed |
| limitPositionRange | Boolean | False | Whether to limit position range |
| showPc | Boolean | False | Whether to show province-city-district |
| saveLimitPosition | List | [] | Save limit position list |
Link (Link)
Inherits: JitDict
Specific Parameters: None
SubTable (Sub-Table)
Inherits: RowList
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| relateType | String | "sub" | Relation type, defaults to "sub" |
| relateField | String | Relation field | |
| relateFieldTitle | String | Relation field title | |
| relateFieldType | String | Relation field type, only needed when target table needs to create field |
JitDict (Dictionary)
Not applicable to model fields
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| variableList | List | [] | Variable list, used to define field configuration in dictionary |
JitList (List)
Not applicable to model fields
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| variableConfig | Dict | Variable configuration, used to define type of list elements, e.g.: {dataType: "Stext"} | |
| generic | String | Generic type, used to specify associated model fullName |
JitMap (Mapping)
Not applicable to model fields
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| valueConfig | Dict | Value configuration, used to define type of mapping values |
RowData (Single Row Data)
Not applicable to model fields
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| generic | String | Generic type, used to specify associated model fullName |
RowList (Multiple Row Datas)
Not applicable to model fields
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| generic | String | Generic type, used to specify associated model fullName |
RelateData (Related Record)
Inherits: RowData
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| relateType | String | Relation type | |
| relateField | String | Relation field | |
| relateFieldTitle | String | Relation field title | |
| generic | String | Used to specify associated model fullName | |
| relateFieldType | String | Relation field type, only needed when target table needs to create field |
MultiRelateData (Related Records)
Inherits: RowList, RelateData
Specific Parameters: None
QFilter (Filter Conditions)
Not applicable to model fields
Specific Parameters: None
Properties and Functions of Each Type Object
All data type objects have the following common properties:
value: Data value of programming language native type, read-write
Stext (Single-line Text)
Properties:
length: Text length, read-only
Functions:
append(value): Append textremove(value): Remove substringgenQrCode(): Generate QR code, returns QR code stringgenBarcode(): Generate barcode, returns barcode stringcnin(value): Check if contains substring, returns booleanncnin(value): Check if does not contain substring, returns booleancninList(valueList): Check if contains any substring, returns booleanncninList(valueList): Check if does not contain any substring, returns booleansw(value): Check if starts with value, returns booleanew(value): Check if ends with value, returns boolean
Ltext (Multi-line Text)
Inherits: Stext
Functions:
getDisplayValue(): Get display value, truncated after 200 characters, returns stringgetFirstValue(): Get first value after splitting by /t, returns stringgetLastValue(): Get last value after splitting by /t, returns stringgetList(): Get value list after splitting by /t, returns string list
Numeric (Number)
Properties:
unit: Unit, read-onlyrealDecimal: Actually set decimal places, read-onlydecimal: Decimal places, read-only, returns 0 when value is None
Functions:
formatData(data): Format data, returns integer or float with specified decimal placesformatDbData(data): Format database datagetPrivateJson(): Get variable private properties, returns dictionary containing maxDigits, decimal and unitadd(num): Add numberreduce(num): Subtract numberrange(rangeList): Check if number is within range, rangeList: [min_value, max_value]gt(value): Check if greater than value, returns booleanlt(value): Check if less than value, returns booleangte(value): Check if greater than or equal to value, returns booleanlte(value): Check if less than or equal to value, returns booleangetDisplayValue(): Get display value with unit, returns string
Money (Currency)
Inherits: Numeric
Properties:
unit: Unit, read-onlyrealDecimal: Actually set decimal places, read-onlydecimal: Decimal places, read-only, returns 0 when value is None
Functions:
formatData(data): Format data, returns integer or float with specified decimal placesformatDbData(data): Format database datagetPrivateJson(): Get variable private properties, returns dictionary containing maxDigits, decimal and unitadd(num): Add numberreduce(num): Subtract numberrange(rangeList): Check if number is within range, rangeList: [min_value, max_value]gt(value): Check if greater than value, returns booleanlt(value): Check if less than value, returns booleangte(value): Check if greater than or equal to value, returns booleanlte(value): Check if less than or equal to value, returns booleangetDisplayValue(): Get display value with unit, returns string
Percent (Percent)
Inherits: Numeric
Properties:
unit: Unit, read-only, defaults to %realDecimal: Actually set decimal places + 2, read-onlydecimal: Decimal places, read-only, returns 0 when value is NonetextValue: Text value, read-only, returns display value with percent sign
Functions:
formatData(data): Format data, returns integer or float with specified decimal placesformatDbData(data): Format database datagetPrivateJson(): Get variable private properties, returns dictionary containing maxDigits, decimal and unitadd(num): Add numberreduce(num): Subtract numberrange(rangeList): Check if number is within range, rangeList: [min_value, max_value]gt(value): Check if greater than value, returns booleanlt(value): Check if less than value, returns booleangte(value): Check if greater than or equal to value, returns booleanlte(value): Check if less than or equal to value, returns booleangetDisplayValue(): Get display value with percent sign, returns stringtoJson(): Convert variable to json configuration, returns json data
RichText (Rich Text)
Inherits: Stext
Properties:
textValue: Plain text value, read-only, text content after removing HTML tags
Functions:
getDisplayValue(): Get plain text display value, returns string
AutoInt (Auto Inc Id)
Inherits: Numeric
Functions:
getCache(): Get default element cache, returns cache objectgetPkValue(): Get next primary key value, returns integergetMaxId(): Get maximum ID in database, returns integergetAutoIntId(count): Get specified number of auto-increment IDs, returns integer listdoFormat(bizRow): Format row dataclearCache(): Clear primary key cache
Serial (Serial Number)
Inherits: Stext
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing prefix, connector and other propertiesdoFormat(bizRow): Format row datagetSerialKey(fieldValue): Get outer cache key, returns stringgetDbValueKey(fieldValue): Get database value key, returns stringgetInnerKey(dateFmt): Get hash key, returns stringgetMaxSerial(key): Get maximum serial number, returns stringgetNumber(key, fieldValue, startNumber): Get serial number cache number, returns integernewSerialNumber(data): Generate serial number, returns stringgetSerialNumber(data): Get serial number, returns stringbulkGetSerialNumber(dataList): Batch generate serial numbers, returns string listgetSerialNumberList(dataList): Get serial number list, returns string listclearCache(): Clear serial number cache
Radio (Single Choice)
Inherits: Stext
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing color, options and other propertiesformatDbData(value): Format database data, returns stringgetDisplayValue(): Get display value, returns string
Dropdown (Single Select)
Inherits: Radio
Properties:
color: Whether to display color, read-onlyoptions: Options list, read-onlyselectionWay: Selection method, read-onlyallowManualInput: Whether to allow manual input, read-onlymulLevelSelectionConfig: Multi-level selection configuration, read-only
MultiRadio (Multiple Choice)
Inherits: Radio
Properties:
maxCount: Maximum selection count, read-onlycolor: Whether to display color, read-onlyoptions: Options list, read-onlyselectionWay: Selection method, read-onlyallowManualInput: Whether to allow manual input, read-onlymulLevelSelectionConfig: Multi-level selection configuration, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing maxCount, color, options and other propertiesgenerateSubConfig(): Generate sub configuration, returns dictionary containing name, title and dataTypeappend(value): Append optionformatDbData(value): Format database data, returns stringgetDisplayValue(): Get display value, returns string
MultiDropdown (Multiple Select)
Inherits: MultiRadio
Properties:
limit: Whether to limit selection, read-onlymaxCount: Maximum selection count, read-onlycolor: Whether to display color, read-onlyoptions: Options list, read-onlyselectionWay: Selection method, read-onlyallowManualInput: Whether to allow manual input, read-onlymulLevelSelectionConfig: Multi-level selection configuration, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing limit, maxCount, color and other propertiesgenerateSubConfig(): Generate sub configuration, returns dictionary containing name, title and dataTypeappend(value): Append option
Checkbox (Checkbox)
Properties:
isEnableDescription: Whether to enable description, read-onlycheckboxDescription: Checkbox description, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing checkboxDescription and isEnableDescriptionformatData(data): Format data, returns 1 or NoneformatDbData(data): Format database data, returns 1 or None
Date (Date)
Properties:
dateTimeType: Date type, read-onlydateTimeFormat: Date format, read-onlycreateDefault: Default value when creating, read-onlyupdateDefault: Default value when updating, read-onlyautoAssign: Auto assignment, read-onlydt: String in "%Y-%m-%d" format, read-writeyear: Year, read-onlyquarter: Quarter, read-onlymonth: Month, read-onlyweekOfYear: Week of year, read-onlyday: Day, read-onlyweekDay: Day of week, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing dateTimeType, dateTimeFormat and other propertiesformatDbData(data): Format database data, returns stringdoFormat(bizRow): Format business datafillBizValue(bizRow, isCreate): Fill business valuegetDefaultTime(): Get default time, returns stringgetValue(): Get value, returns stringaddYear(n): Add yearsaddMonth(n): Add monthsaddQuarter(n): Add quartersaddWeek(n): Add weeksaddWeekOfYear(n): Add weeks of yearaddDay(n): Add daysreduceYear(n): Subtract yearsreduceMonth(n): Subtract monthsreduceQuarter(n): Subtract quartersreduceWeek(n): Subtract weeksreduceWeekOfYear(n): Subtract weeks of yearreduceDay(n): Subtract daysgetDisplayValue(): Get display value, returns stringrange(rangeList): Check if within range, rangeList: [min_value, max_value]gt(value): Check if greater than value, returns booleanlt(value): Check if less than value, returns booleangte(value): Check if greater than or equal to value, returns booleanlte(value): Check if less than or equal to value, returns booleangetCompareValue(tql, operator, value): Get comparison value
Datetime (Date Time)
Inherits: Date
Properties:
dateTimeType: Date time type, read-onlydateTimeFormat: Date time format, read-onlycreateDefault: Whether to use default value when creating, read-onlyupdateDefault: Whether to use default value when updating, read-onlyautoAssign: Auto assignment rules, read-onlyhour: Hour, read-onlyminute: Minute, read-onlysecond: Second, read-onlydate: Date part, read-only
Time (Time)
Inherits: Datetime
Functions:
doRead(dbRow): Read database row data, returns string
File (Attachments)
Inherits: JitList
Properties:
maxCount: Maximum file count, read-onlymaxSize: Maximum file size (MB), read-onlyminSize: Minimum file size (MB), read-onlyacceptTypes: Acceptable file types, read-onlyselectedDown: Whether download is allowed, read-onlyselectedDelete: Whether deletion is allowed, read-onlyselectedDownUser: Users allowed to download, read-onlyselectedDeleteUser: Users allowed to delete, read-onlysize: Total file size, read-onlycount: File count, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing maxCount, maxSize and other propertiesappend(imageValue): Append filegetDisplayValue(): Get display value, returns stringgetFirstValue(): Get first value, returns stringgetLastValue(): Get last value, returns stringgetList(): Get value list, returns string list
Image (Images)
Inherits: JitList
Properties:
imgType: Image type, read-onlysize: Image size, read-onlymaxCount: Maximum image count, read-onlymaxSize: Maximum image size (MB), read-onlyisAddWatermark: Whether to add watermark, read-onlyisCameraOnly: Whether camera only, read-onlyimageSize: Total image size, read-onlyimageName: Image name list, read-onlyimageType: Image type list, read-onlycount: Image count, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing imgType, size and other propertiesappend(imageValue): Append imagegetDisplayValue(): Get display value, returns stringgetFirstValue(): Get first value, returns stringgetLastValue(): Get last value, returns stringgetList(): Get value list, returns string list
Signature (Signature)
Properties:
mode: Signature mode, read-only (new: sign again each time, prev: use previous signature)
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing mode
Dept (Single Department)
Inherits: Stext
Properties:
selectionWay: Department scope selection method, read-onlyavailableDeptId: Available department ID, read-onlymulLevelSelectionConfig: Multi-level selection configuration, read-onlyavailableParentDeptId: Available parent department ID, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing selectionWay, availableDeptId and other propertiesgetName(): Get department name through department id list, returns stringgetDisplayValue(): Get text value, returns stringgetLeader(): Get leader, returns stringgetDirectDept(): Get parent department, returns stringgetDeptPath(): Get department path, returns stringgetRankDpt(rank): Get rank leader, returns stringgetFirstDept(): Get first level department, returns stringgetSecondDept(): Get second level department, returns stringgetThirdDept(): Get third level department, returns stringgetFourthDept(): Get fourth level department, returns stringgetFifthDept(): Get fifth level department, returns stringbelong(value): Check if is parent department, returns booleannotBelong(value): Check if is not parent department, returns booleangetCompareValue(tql, operator, value): Get comparison value
MultiDept (Multiple Departments)
Inherits: Dept
Functions:
generateSubConfig(): Generate variable configuration through multiple selection iteration, returns dictionary containing name, title and dataTypeappend(value): Append department
Member (Single Member)
Inherits: Stext
Properties:
selectionWay: Selection method, read-onlyavailableUser: Available user, read-onlyallowLeave: Whether to allow resignation, read-onlymulLevelSelectionConfig: Multi-level selection configuration, read-onlycreateDefault: Default value when creating, read-onlyupdateDefault: Default value when updating, read-only
Functions:
getPrivateJson(): Get variable private propertiesfillBizValue(bizRow, isCreate): Fill business valuegetDisplayValue(): Get display value, returns stringgetName(): Get member name, returns stringgetRankDept(level): Get rank department, returns stringgetRankLeader(level): Get rank leader, returns stringgetMemberStatus(): Get member status, returns "在职" or "离职"getDirectDept(): Get direct department, returns stringgetFirstDept(): Get first level department, returns stringgetSecondDept(): Get second level department, returns stringgetThirdDept(): Get third level department, returns stringgetFourthDept(): Get fourth level department, returns stringgetFifthDept(): Get fifth level department, returns stringgetDirectLeader(): Get direct leader, returns stringgetFirstLeader(): Get first level leader, returns stringgetSecondLeader(): Get second level leader, returns stringgetThirdLeader(): Get third level leader, returns stringgetFourthLeader(): Get fourth level leader, returns stringgetFifthLeader(): Get fifth level leader, returns stringgetAllRankLeader(level): Get all parent rank leaders, returns string listbelong(value): Check if is parent leader, returns booleannotBelong(value): Check if is not parent leader, returns boolean
MultiMember (Multiple Members)
Inherits: Member
Functions:
generateSubConfig(): Generate sub configuration, returns dictionary containing name, title and dataTypeappend(value): Append member
Address (Address)
Inherits: JitDict
Properties:
addressFormat: Address format, read-onlydetail: Whether to display detailed address, read-onlyprovince: Province, read-onlycity: City, read-onlydistrict: District, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing addressFormat and detailbelong(address): Check if belongs to specified address, returns booleannotBelong(address): Check if does not belong to specified address, returns booleangetDisplayValue(): Get display value, returns stringgetCompareValue(tql, operator, value): Get comparison value
Identify (ID Number)
Inherits: Stext
Properties:
address: Address, read-only, returns province namebirthday: Birthday, read-only, returns date objectage: Age, read-only, returns integergender: Gender, read-only, returns "男" or "女"
LicensePlate (License Plate Number)
Inherits: Stext
Properties:
maxLen: Maximum length, read-only, defaults to 12
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing maxLenprovinceCode(): Get province abbreviation, returns string
Phone (Phone Number)
Inherits: Stext
Properties:
rules: Phone number rules, read-onlymaxLen: Maximum length, read-only, defaults to 11
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing rules
Position (Location)
Inherits: Address
Properties:
address: Address, read-onlylng: Longitude, read-onlylat: Latitude, read-onlyadjustRange: Adjustment range, read-onlyadjustment: Whether adjustable, read-onlylimitPositionRange: Whether to limit position range, read-onlyshowPc: Whether to show PC side, read-onlysaveLimitPosition: Save limit position list, read-only
Functions:
getPrivateJson(): Get variable private propertiesgetDisplayValue(): Get display value, returns string
Link (Link)
Inherits: JitDict
Properties:
linkTitle: Link title, read-writeurl: Link address, read-write
Functions:
getDisplayValue(): Get display value, returns link title or URL
SubTable (Sub-Table)
Inherits: RowList
Properties:
relateField: Relation field, read-onlyrelateType: Relation type, read-onlyrelateFieldType: Relation field type, read-onlyrelateFieldTitle: Relation field title, read-onlyfirstRow: First row data, read-onlylastRow: Last row data, read-only
Functions:
getPrivateJson(): Get variable private propertiesresetFilter(): Reset filter conditions, returns selfget(*args, **kwargs): Get first data based on filter conditions, returns data objectorderBy(*key): Sort sub-table data, returns selfslice(start, end): Slice, inclusive start and end, returns selftoDict(): Convert to variable json configuration, returns data listformatData(value): Convert lower-level data to upper-level data, returns formatted datadoFormat(_): Format data, returns NonedoWrite(bizRow): Write data, returns sub-table valuegetRelateData(rowDataList, level=2): Get related data, no return value
JitDict (Dictionary)
Properties:
KVCount: Key-value pair count, read-onlyvalue: Variable return value, read-write
Functions:
reset(): Reset dictionarytoDict(): Convert to data dict, returns dictionaryformatDbData(value): Convert lower-level data to upper-level data, returns stringformatData(value): Convert lower-level data to upper-level data, returns dictionarygetPrivateJson(): Get variable private properties, returns dictionary containing variableListparseSubTableData(dt): Process sub-table variable data, returns data listparseRelateData(dt): Process related variable data, returns dictionary
JitList (List)
Properties:
calculable: Whether sum or average calculation is possible, read-onlycomparable: Whether comparable, read-onlyvalue: Variable return value, read-writelistCount: List element count, read-onlydistinctListCount: List element distinct count, read-onlysum: List element sum, read-onlyaverage: List element average, read-onlymax: List element maximum, read-onlymin: List element minimum, read-only
Functions:
append(value): Append element, value can be dict or listdistinctAppend(value): Append element with deduplication, value can be dict or listgetValueByIndex(index): Get value by position, returns element valueupdateValueByIndex(index, value): Modify value by positionremove(value): Remove element from listreset(): Reset listgenerateSubConfig(): Generate iterative variable configuration, returns variable configurationformatDbData(value): Convert lower-level data to upper-level data, returns stringformatData(value): Convert lower-level data to upper-level data, returns listgetFirstValue(): Get first value, returns element valuegetLastValue(): Get last value, returns element valuegetList(): Get value list, returns listgetPrivateJson(): Get variable private properties, returns dictionary containing variableConfig and generic
JitMap (Mapping)
Properties:
value: Variable value, read-writekeys: Key list, read-onlyvalues: Value list, read-only
Functions:
getPrivateJson(): Get variable private properties, returns dictionary containing valueConfigclear(): Clear mappingget(key): Get value of specified key, returns valueset(key, value): Set key-value pair
RowData (Single Row Data)
Properties:
value: Variable value, read-writepkData: Primary key data, read-only
Functions:
toDict(): Convert to data dict, returns dictionaryupdate(**kwargs): Update single row datareset(): Reset single row data, returns selfrefresh(): Refresh data, reload from database
RowList (Multiple Row Datas)
Properties:
Model: Corresponding model class, read-onlyvalue: Variable value, read-writelength: Data length, read-onlyfirstRow: First row data, read-only
Functions:
save(triggerEvent=1): Save multiple row data to databasedelete(triggerEvent=1): Delete data from databaseupdate(filter, updateDict): Update data, returns updated data listappend(data): Append single or multiple row datareset(): Reset multiple row data, returns selffilter(q): Filter multiple row data, returns filtered data listaggregate(filter, fieldId, aggrFunc): Column statistics for multiple row data, returns statistical resultsgetMax(valueList, fieldId): Get column maximum value for multiple row data, returns maximum valuegetMin(valueList, fieldId): Get column minimum value for multiple row data, returns minimum valuegetAvg(valueList, fieldId): Get column average value for multiple row data, returns average valuegetSum(valueList, fieldId): Get column sum for multiple row data, returns sumgetNullCount(valueList, fieldId): Get column null count for multiple row data, returns null value countgetNotNullCount(valueList, fieldId): Get column non-null count for multiple row data, returns non-null value countgetDistinctCount(valueList, fieldId): Get column distinct count for multiple row data, returns distinct countgenerateSubConfig(): Generate variable configuration through variable iteration, returns dictionary containing name, title, dataType and genericgetFirstValue(): Get first value, returns data objectgetLastValue(): Get last value, returns data objectgetList(): Get value list, returns data listtransToJitMap(fieldId): Convert to JitMap type, returns JitMap object
RelateData (Related Record)
Inherits: RowData
Properties:
value: Variable value, read-writerelateRowData: Related row data, read-onlycascade: Cascade configuration, read-only, defaults to value. (Optional values: delete: delete related data when deleting main table data, protect: not allow deleting main table data, value: set related table data to specified value when deleting main table data, nothing: do nothing)dbFieldType: Database field type, read-only, returns IntField or CharField based on relateFieldTypedbConfig: Database configuration, read-only, returns dictionary containing maxLen
Functions:
getPrivateJson(): Get variable private propertiessave(triggerEvent=1): Save to database, returns saved datadelete(**kwargs): Delete data from database, returns deletion resultformatDbData(value): Convert upper-level data to lower-level SQL format, returns formatted datadoFormat(rowData): Format row data, returns formatted datagetDisplayValue(): Get display value, returns stringgetRelateData(rowDataList, level=2): Get related data, no return value
MultiRelateData (Related Records)
Inherits: RowList, RelateData
QFilter (Filter Conditions)
Properties:
value: Variable value, read-write
Functions:
append(q): Append query condition, q is a query condition built with Q Expression