ignores:
  - migrations
  - river_client
  - river_client_queue
  - river_job
  - river_leader
  - river_migration
  - river_queue
imports:
  - go.ipao.vip/gen
  - quyun/v2/pkg/consts
  - quyun/v2/database/fields
field_type:
  users:
    gender: consts.Gender
    roles: types.Array[consts.Role]
    location: types.JSONType[fields.UserLocation]
    status: consts.UserStatus
  contents:
    status: consts.ContentStatus
    visibility: consts.ContentVisibility
    genre: string
    tags: types.JSONSlice[string]
  content_prices:
    currency: consts.Currency
    discount_type: consts.DiscountType
  orders:
    status: consts.OrderStatus
    type: consts.OrderType
    currency: consts.Currency
    snapshot: types.JSONType[fields.OrdersSnapshot]
  order_items:
    snapshot: types.JSONType[fields.OrderItemsSnapshot]
  tenants:
    status: consts.TenantStatus
    config: types.JSONType[fields.TenantConfig]
  tenant_users:
    role: types.Array[consts.TenantUserRole]
    status: consts.UserStatus
  content_assets:
    role: consts.ContentAssetRole
  media_assets:
    meta: types.JSONType[fields.MediaAssetMeta]
    type: consts.MediaAssetType
    status: consts.MediaAssetStatus
    variant: consts.MediaAssetVariant
  content_access:
    status: consts.ContentAccessStatus
  tenant_ledgers:
    type: consts.TenantLedgerType
field_relate:
  contents:
    Author:
      relation: belongs_to
      table: users
      foreign_key: user_id
      references: id
      json: author
    ContentAssets:
      relation: has_many
      table: content_assets
      foreign_key: content_id
      references: id
      json: content_assets
    Comments:
      relation: has_many
      table: comments
      foreign_key: content_id
      references: id
      json: comments
  comments:
    User:
      relation: belongs_to
      table: users
      foreign_key: user_id
      references: id
      json: user
  content_assets:
    Asset:
      relation: belongs_to
      table: media_assets
      foreign_key: asset_id
      references: id
      json: asset
