
    j
                        d Z ddlmZ ddlZddlZddlmZmZ ddlm	Z	 dZ
 G d de      Z G d	 d
e      Z G d de      Z G d de      ZddZddZy)z2Public service contracts for nutrition onboarding.    )annotationsN)	BaseModel
ConfigDict)OnboardingState)date_of_birthequation_sex_basis	height_cm	weight_kgactivity_categoryactivity_rationale	goal_typetarget_weight_kgtarget_date	allergiesintolerancesreligious_ethical_exclusionsdisliked_foodsdietary_preferences
conditionsmedicationspregnancy_breastfeedingeating_disorder_riskcooking_accessbudget_band
meal_countschedule_constraintsc                       e Zd Z edd      Zy)DomainModelforbidT)extrafrozenN)__name__
__module____qualname__r   model_config     z/home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile/checkin_cli/nutrition_onboarding_contract.pyr   r   '   s    HT:Lr'   r   c                  r    e Zd ZU ded<   ded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   ded<   y)OnboardingAuthoritystrcustomer_keyintcustomer_user_idcustomer_chat_idcustomer_topic_idowner_user_idowner_chat_idowner_topic_idconsent_notice_versionboolconsent_grantedcustomer_enabledNr"   r#   r$   __annotations__r&   r'   r(   r*   r*   +   s>    r'   r*   c                  @    e Zd ZU ded<   ded<   ded<   ded<   ded<   y)MessageEvidencer-   actor_user_idchat_idtopic_id
message_id	update_idNr8   r&   r'   r(   r;   r;   8   s    LMONr'   r;   c                  R    e Zd ZU ded<   ded<   ded<   ded<   d	Zded
<   dZded<   y	)OnboardingStatusr+   r,   r   stater-   answer_countz
str | None
next_fieldNbaseline_digestFr5   owner_reviewed)r"   r#   r$   r9   rF   rG   r&   r'   r(   rB   rB   @   s.    "&OZ& ND r'   rB   c                    t        j                  t        j                  | ddd      j	                               j                         S )NFT),:)ensure_ascii	sort_keys
separators)hashlibsha256jsondumpsencode	hexdigest)values    r(   canonical_digestrU   I   s5    >>

5uT[[]ikr'   c                n    dddddddd d ddd	d
ddd}h d}| |v rdg dS | |vrt        d|        ||    S )Nz
1996-08-01male18080moderateu   주 3회 근력 운동maintainFu   기본 조리 가능u   보통   u   없음)r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   >   r   r   r   r   r   r   r   none)statusitemszunknown question field: )
ValueError)fieldexamples
structureds      r(   example_answerrd   O   sw    %$'6 #( %0 (#H"J 
 2..H3E7;<<E?r'   )rT   objectreturnr+   )ra   r+   rf   re   )__doc__
__future__r   rN   rP   pydanticr   r   'checkin_cli.nutrition_onboarding_modelsr   QUESTION_FIELDSr   r*   r;   rB   rU   rd   r&   r'   r(   <module>rl      sX    8 "   * C4;) ;
+ 
k !{ !r'   