lesson-records-schema.sql 8.1 KB

1234567891011
  1. -- Matches production column types inspected 2026-10-13. Contains no business data.
  2. CREATE TABLE "LessonRecord" ("objectId" text PRIMARY KEY, "sourceKey" text, "company" text, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "id" numeric, "jsmz" text, "xymz" text, "kclx" text, "kzsj" text, "kcid" text, "yyds" text, "pf" numeric, "pjnr" text, "plpjsj" text, "pldp" text, "szmdid" text, "jffs" text, "kcmc" text, "legacyGeneralId" double precision, "storeId" double precision, "coachName" text, "courseName" text, "sourceCreatedAt" timestamp with time zone, "lessonAt" timestamp with time zone, "studentName" text, "_rperm" text[], "_wperm" text[], "courseCategoryKey" text, "courseCategoryName" text, "bindingId" text, "creditCostsSnapshot" jsonb, "teacherPaySnapshot" double precision, "teachingManaged" boolean);
  3. CREATE TABLE "LessonCompletionReport" ("objectId" text PRIMARY KEY, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "company" text, "sourceKey" text, "appointmentId" text, "appointmentGeneralId" double precision, "lessonId" text, "studentId" double precision, "coachId" double precision, "courseCategoryKey" text, "courseCategoryName" text, "deliveryMode" text, "durationMinutes" double precision, "actualStartAt" timestamp with time zone, "actualEndAt" timestamp with time zone, "creditCosts" jsonb, "contentSummary" text, "vocabularyCount" double precision, "reviewStatus" text, "reviewSummary" text, "trainingStatus" text, "trainingSummary" text, "antiForgetSummary" jsonb, "homework" text, "noHomework" boolean, "notes" text, "submittedBy" text, "submittedAt" timestamp with time zone, "_rperm" text[], "_wperm" text[], "coachComment" text);
  4. CREATE TABLE "MemoryPracticeRecord" ("objectId" text PRIMARY KEY, "sourceKey" text, "company" text, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "id" numeric, "yhid" numeric, "plid" numeric, "orderId" numeric, "kcid" numeric, "kywsj" text, "xxjlid" numeric, "fxzt" text, "kywrq" text, "wcsj" text, "_rperm" text[], "_wperm" text[], "rewardTaskKey" text, "rewardDuplicate" boolean);
  5. CREATE TABLE "DailyStudyRecord" ("objectId" text PRIMARY KEY, "sourceKey" text, "company" text, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "id" numeric, "con" text, "userId" numeric, "xxqs" text, "learned" numeric, "ygg" numeric, "djq" numeric, "dqrq" text, "fxrl" text, "pl" text, "dsid" text, "szmdid" text, "_rperm" text[], "_wperm" text[], "bindingId" text, "recordScope" text, "canonicalStudyId" text, "studyVersion" double precision);
  6. CREATE TABLE "CommonModel" ("objectId" text PRIMARY KEY, "sourceKey" text, "company" text, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "generalId" numeric, "orderId" numeric, "nodeId" numeric, "modelId" numeric, "itemId" numeric, "tableName" text, "title" text, "inputer" text, "hits" numeric, "createTime" timestamp with time zone, "status" numeric, "eliteLevel" numeric, "infoId" numeric, "specialId" text, "isCreate" numeric, "htmlLink" text, "titlecolor" text, "template" text, "tagKey" text, "upDateTime" timestamp with time zone, "upDateType" numeric, "becauseBack" text, "pdfLink" text, "rtype" text, "successfulUserId" numeric, "complianceUserList" text, "subtitle" text, "pytitle" text, "defaultSkins" numeric, "firstNodeId" numeric, "titleStyle" text, "parentTree" text, "topImg" text, "isCatch" numeric, "relatedIds" text, "isComm" numeric, "auditTime" text, "ugroupAuth" text, "isTop" numeric, "isTopTime" text, "ip" text, "taskInfo" text, "_rperm" text[], "_wperm" text[], "teachingManaged" boolean);
  7. CREATE TABLE "_User" ("objectId" text PRIMARY KEY, "createdAt" timestamp with time zone, "updatedAt" timestamp with time zone, "username" text, "_hashed_password" text, "_password_history" jsonb, "email" text, "emailVerified" boolean, "authData" jsonb, "_rperm" text[], "_wperm" text[], "_failed_login_count" double precision, "_perishable_token" text, "_email_verify_token" text, "_account_lockout_expires_at" timestamp with time zone, "_perishable_token_expires_at" timestamp with time zone, "_email_verify_token_expires_at" timestamp with time zone, "_password_changed_at" timestamp with time zone, "name" text, "nickname" text, "mobile" text, "company" character, "sex" text, "wxapp" jsonb, "diyform" jsonb, "city" text, "province" text, "country" text, "avatar" text, "realname" text, "userid" double precision, "idcard" text, "type" text, "roles" jsonb, "depart" character, "wechat" jsonb, "certify" jsonb, "school" text, "agent" character, "invite" character, "authentication" jsonb, "agentLevel" character, "invitePath" jsonb, "bindCity" text, "bindCounty" text, "bindProvince" text, "interestTag" jsonb, "age" double precision, "share" text, "staff" text, "store" text, "idcardType" text, "postCode" text, "address" text, "userLeague" text, "cates" jsonb, "num" double precision, "realName" text, "phone" text, "hash" text, "hashType" text, "status" text, "registrationId" text, "appPassword" text, "sessionToken" text, "isDeleted" boolean, "date" text, "level" text, "learningDays" double precision, "achievementCount" double precision, "completionRate" double precision, "desc" text, "dyapp" jsonb, "useMasterKey" boolean, "gender" text, "birthday" timestamp with time zone, "userType" text, "instance" text, "lastLogin" timestamp with time zone, "data" jsonb, "contact" text, "partner" text, "Partner" text, "birthplace" text, "residence" text, "followUpResult" text, "source" jsonb, "passwordChanged" boolean, "createdBy" text, "passwordChangedAt" timestamp with time zone, "agreementConsents" jsonb, "mobilePhoneNumber" text, "trafficDeductedStoreId" text, "trafficDeducted" boolean, "trafficDeductedAt" timestamp with time zone, "trafficDeductedStores" jsonb, "trafficDeductedAtMap" jsonb, "trafficExemptAt" timestamp with time zone, "trafficExempt" boolean, "trafficExemptStoreId" text, "adminRoleKey" text, "isAdmin" boolean, "isBanned" boolean, "isDisabled" boolean, "isFrozen" boolean, "statusAction" text, "statusReason" text, "statusUntil" timestamp with time zone, "statusUpdatedAt" timestamp with time zone, "statusUpdatedBy" text, "personalTag" text, "fmodeApiToken" text, "newapiToken" text, "mobileVerified" boolean, "wechatMobileBindPromptDismissed" boolean, "wechatMobileBoundAt" timestamp with time zone, "wechatMobileBound" boolean, "is_wechat_bind_mobile" boolean, "memorySettings" jsonb, "memorySettingsUpdatedAt" timestamp with time zone, "legalAgreementAt" timestamp with time zone, "legalAgreementVersion" text, "testExpiresAt" timestamp with time zone, "testPurpose" text, "isTest" boolean, "testCreatedBy" text, "nickName" text, "role" text, "roleName" text, "primaryPerson" text, "legacySource" text, "legacyUserId" double precision, "legacyGroupId" double precision, "legacyPasswordHash" text, "legacyPasswordHashType" text, "passwordResetRequired" boolean, "legacyLoginTimes" double precision, "legacyUserData" jsonb, "legacyUserBase" jsonb, "legacyUserPlat" jsonb, "legacyWxUser" jsonb, "identityType" text, "registeredAt" timestamp with time zone, "grade" text, "sourceKey" text, "legacyPasswordMigrationAllowed" boolean, "credentialRevision" double precision, "credentialExpectedRevision" double precision, "credentialMigrationAttempt" boolean);
  8. CREATE TABLE "PayrollBatch" ("objectId" text PRIMARY KEY,"company" text,"month" text,"status" text,"baseAmount" double precision,"adjustmentAmount" double precision,"payableAmount" double precision,"totalHours" double precision,"lessonCount" double precision);
  9. CREATE TABLE "PayrollLine" ("objectId" text PRIMARY KEY,"company" text,"batchId" text,"kind" text,"excluded" boolean,"coachId" double precision,"coachName" text,"studentName" text,"courseName" text,"storeId" double precision,"storeName" text,"amount" double precision,"rateAmount" double precision,"durationHours" double precision,"originalMonth" text,"settlementMonth" text,"lessonAt" timestamptz,"exception" text,"classType" double precision,"courseCategoryName" text);
  10. CREATE TABLE "Node" (company text,"nodeId" numeric,"nodeName" text);
  11. CREATE TABLE "LessonReview" (company text,"appointmentGeneralId" text,score numeric,comment text,"submittedAt" timestamptz);