fix (backend-rs): add use_nullable to struct

Co-authored-by: naskya <m@naskya.net>
This commit is contained in:
sup39 2024-02-28 16:53:51 +09:00 committed by naskya
parent cab45aefa4
commit 99f05f3b09
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
76 changed files with 165 additions and 168 deletions

175
Cargo.lock generated
View file

@ -30,9 +30,9 @@ dependencies = [
[[package]]
name = "ahash"
version = "0.8.8"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
checksum = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b"
dependencies = [
"cfg-if",
"getrandom",
@ -80,9 +80,9 @@ dependencies = [
[[package]]
name = "anstream"
version = "0.6.12"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540"
checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [
"anstyle",
"anstyle-parse",
@ -169,7 +169,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -180,7 +180,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -387,15 +387,15 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
"syn_derive",
]
[[package]]
name = "bumpalo"
version = "3.15.0"
version = "3.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f"
checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b"
[[package]]
name = "bytecheck"
@ -439,12 +439,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "cc"
version = "1.0.83"
version = "1.0.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"libc",
]
checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc"
[[package]]
name = "cfg-if"
@ -470,7 +467,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -514,7 +511,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -611,12 +608,12 @@ dependencies = [
[[package]]
name = "ctor"
version = "0.2.6"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e"
checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c"
dependencies = [
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -695,9 +692,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]]
name = "dyn-clone"
version = "1.0.16"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "either"
@ -964,7 +961,7 @@ version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
"ahash 0.8.8",
"ahash 0.8.10",
"allocator-api2",
]
@ -988,9 +985,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
version = "0.3.6"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60"
[[package]]
name = "hex"
@ -1134,7 +1131,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -1191,7 +1188,7 @@ version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978"
dependencies = [
"ahash 0.8.8",
"ahash 0.8.10",
"anyhow",
"base64",
"bytecount",
@ -1338,9 +1335,9 @@ dependencies = [
[[package]]
name = "napi"
version = "2.15.0"
version = "2.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efbf98e1bcb85cc441bbf7cdfb11070d2537a100e2697d75397b2584c32492d1"
checksum = "54a63d0570e4c3e0daf7a8d380563610e159f538e20448d6c911337246f40e84"
dependencies = [
"bitflags 2.4.2",
"chrono",
@ -1361,23 +1358,23 @@ checksum = "2f9130fccc5f763cf2069b34a089a18f0d0883c66aceb81f2fad541a3d823c43"
[[package]]
name = "napi-derive"
version = "2.15.0"
version = "2.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7622f0dbe0968af2dacdd64870eee6dee94f93c989c841f1ad8f300cf1abd514"
checksum = "05bb7c37e3c1dda9312fdbe4a9fc7507fca72288ba154ec093e2d49114e727ce"
dependencies = [
"cfg-if",
"convert_case",
"napi-derive-backend",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
name = "napi-derive-backend"
version = "1.0.61"
version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d03b8f403a37007cad225039fc0323b961bb40d697eea744140920ebb689ff1d"
checksum = "f785a8b8d7b83e925f5aa6d2ae3c159d17fe137ac368dc185bef410e7acdaeb4"
dependencies = [
"convert_case",
"once_cell",
@ -1385,7 +1382,7 @@ dependencies = [
"quote",
"regex",
"semver",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -1578,7 +1575,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -1627,7 +1624,7 @@ dependencies = [
"regex",
"regex-syntax 0.7.5",
"structmeta",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2105,7 +2102,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2146,7 +2143,7 @@ dependencies = [
"proc-macro2",
"quote",
"sea-bae",
"syn 2.0.49",
"syn 2.0.51",
"unicode-ident",
]
@ -2197,22 +2194,22 @@ checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
[[package]]
name = "serde"
version = "1.0.196"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.196"
version = "1.0.197"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2228,9 +2225,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.113"
version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
dependencies = [
"itoa",
"ryu",
@ -2336,12 +2333,12 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
name = "socket2"
version = "0.5.5"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
dependencies = [
"libc",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@ -2399,7 +2396,7 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
dependencies = [
"ahash 0.8.8",
"ahash 0.8.10",
"atoi",
"bigdecimal",
"byteorder",
@ -2631,7 +2628,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2642,7 +2639,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2670,9 +2667,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.49"
version = "2.0.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c"
dependencies = [
"proc-macro2",
"quote",
@ -2688,7 +2685,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2726,9 +2723,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
version = "3.10.0"
version = "3.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
"cfg-if",
"fastrand",
@ -2753,7 +2750,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2829,7 +2826,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2900,7 +2897,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]
@ -2938,9 +2935,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
version = "0.1.22"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
dependencies = [
"tinyvec",
]
@ -3049,7 +3046,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
"wasm-bindgen-shared",
]
@ -3083,7 +3080,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -3122,7 +3119,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -3140,7 +3137,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -3160,17 +3157,17 @@ dependencies = [
[[package]]
name = "windows-targets"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f"
dependencies = [
"windows_aarch64_gnullvm 0.52.0",
"windows_aarch64_msvc 0.52.0",
"windows_i686_gnu 0.52.0",
"windows_i686_msvc 0.52.0",
"windows_x86_64_gnu 0.52.0",
"windows_x86_64_gnullvm 0.52.0",
"windows_x86_64_msvc 0.52.0",
"windows_aarch64_gnullvm 0.52.3",
"windows_aarch64_msvc 0.52.3",
"windows_i686_gnu 0.52.3",
"windows_i686_msvc 0.52.3",
"windows_x86_64_gnu 0.52.3",
"windows_x86_64_gnullvm 0.52.3",
"windows_x86_64_msvc 0.52.3",
]
[[package]]
@ -3181,9 +3178,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6"
[[package]]
name = "windows_aarch64_msvc"
@ -3193,9 +3190,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f"
[[package]]
name = "windows_i686_gnu"
@ -3205,9 +3202,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb"
[[package]]
name = "windows_i686_msvc"
@ -3217,9 +3214,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58"
[[package]]
name = "windows_x86_64_gnu"
@ -3229,9 +3226,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614"
[[package]]
name = "windows_x86_64_gnullvm"
@ -3241,9 +3238,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c"
[[package]]
name = "windows_x86_64_msvc"
@ -3253,9 +3250,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6"
[[package]]
name = "winnow"
@ -3308,7 +3305,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.49",
"syn 2.0.51",
]
[[package]]

View file

@ -3,9 +3,9 @@ members = ["packages/backend-rs"]
resolver = "2"
[workspace.dependencies]
napi = { version = "=2.15.0", default-features = false }
napi = { version = "2.16.0", default-features = false }
napi-build = "2.1.0"
napi-derive = "=2.15.0"
napi-derive = "2.16.0"
argon2 = "0.5.3"
async-trait = "0.1.77"

View file

@ -106,7 +106,7 @@ $(T)/regenerate-entities: $(MIGRATIONS)
for file in src/model/entity/*; do \
base=$$(basename -- "$${file}"); \
jsname=$$(printf '%s\n' "$${base%.*}" | perl -pe 's/(^|_)./uc($$&)/ge;s/_//g'); \
attribute=$$(printf 'napi_derive::napi(object, js_name = "%s")' "$${jsname}"); \
attribute=$$(printf 'napi_derive::napi(object, js_name = "%s", use_nullable = true)' "$${jsname}"); \
sed -i "s/NAPI_EXTRA_ATTR_PLACEHOLDER/$${attribute}/" "$${file}"; \
done
sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[napi_derive::napi]/' \

View file

@ -6,7 +6,7 @@ use std::fs;
#[derive(Clone, Debug, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct ServerConfig {
pub url: String,
pub db: DbConfig,
@ -15,7 +15,7 @@ pub struct ServerConfig {
}
#[derive(Clone, Debug, PartialEq, Deserialize)]
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct DbConfig {
pub host: String,
pub port: u32,
@ -25,7 +25,7 @@ pub struct DbConfig {
}
#[derive(Clone, Debug, PartialEq, Deserialize)]
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct RedisConfig {
pub host: String,
pub port: u32,
@ -40,7 +40,7 @@ pub struct RedisConfig {
#[derive(Clone, Debug, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct TlsConfig {
pub host: String,
pub reject_unauthorized: bool,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "abuse_user_report")]
#[napi_derive::napi(object, js_name = "AbuseUserReport")]
#[napi_derive::napi(object, js_name = "AbuseUserReport", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "access_token")]
#[napi_derive::napi(object, js_name = "AccessToken")]
#[napi_derive::napi(object, js_name = "AccessToken", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "ad")]
#[napi_derive::napi(object, js_name = "Ad")]
#[napi_derive::napi(object, js_name = "Ad", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "announcement")]
#[napi_derive::napi(object, js_name = "Announcement")]
#[napi_derive::napi(object, js_name = "Announcement", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "announcement_read")]
#[napi_derive::napi(object, js_name = "AnnouncementRead")]
#[napi_derive::napi(object, js_name = "AnnouncementRead", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "antenna")]
#[napi_derive::napi(object, js_name = "Antenna")]
#[napi_derive::napi(object, js_name = "Antenna", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "app")]
#[napi_derive::napi(object, js_name = "App")]
#[napi_derive::napi(object, js_name = "App", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "attestation_challenge")]
#[napi_derive::napi(object, js_name = "AttestationChallenge")]
#[napi_derive::napi(object, js_name = "AttestationChallenge", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "auth_session")]
#[napi_derive::napi(object, js_name = "AuthSession")]
#[napi_derive::napi(object, js_name = "AuthSession", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "blocking")]
#[napi_derive::napi(object, js_name = "Blocking")]
#[napi_derive::napi(object, js_name = "Blocking", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel")]
#[napi_derive::napi(object, js_name = "Channel")]
#[napi_derive::napi(object, js_name = "Channel", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel_following")]
#[napi_derive::napi(object, js_name = "ChannelFollowing")]
#[napi_derive::napi(object, js_name = "ChannelFollowing", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel_note_pining")]
#[napi_derive::napi(object, js_name = "ChannelNotePining")]
#[napi_derive::napi(object, js_name = "ChannelNotePining", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "clip")]
#[napi_derive::napi(object, js_name = "Clip")]
#[napi_derive::napi(object, js_name = "Clip", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "clip_note")]
#[napi_derive::napi(object, js_name = "ClipNote")]
#[napi_derive::napi(object, js_name = "ClipNote", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "drive_file")]
#[napi_derive::napi(object, js_name = "DriveFile")]
#[napi_derive::napi(object, js_name = "DriveFile", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "drive_folder")]
#[napi_derive::napi(object, js_name = "DriveFolder")]
#[napi_derive::napi(object, js_name = "DriveFolder", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "emoji")]
#[napi_derive::napi(object, js_name = "Emoji")]
#[napi_derive::napi(object, js_name = "Emoji", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "follow_request")]
#[napi_derive::napi(object, js_name = "FollowRequest")]
#[napi_derive::napi(object, js_name = "FollowRequest", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "following")]
#[napi_derive::napi(object, js_name = "Following")]
#[napi_derive::napi(object, js_name = "Following", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "gallery_like")]
#[napi_derive::napi(object, js_name = "GalleryLike")]
#[napi_derive::napi(object, js_name = "GalleryLike", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "gallery_post")]
#[napi_derive::napi(object, js_name = "GalleryPost")]
#[napi_derive::napi(object, js_name = "GalleryPost", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "hashtag")]
#[napi_derive::napi(object, js_name = "Hashtag")]
#[napi_derive::napi(object, js_name = "Hashtag", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "instance")]
#[napi_derive::napi(object, js_name = "Instance")]
#[napi_derive::napi(object, js_name = "Instance", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "messaging_message")]
#[napi_derive::napi(object, js_name = "MessagingMessage")]
#[napi_derive::napi(object, js_name = "MessagingMessage", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "meta")]
#[napi_derive::napi(object, js_name = "Meta")]
#[napi_derive::napi(object, js_name = "Meta", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "migrations")]
#[napi_derive::napi(object, js_name = "Migrations")]
#[napi_derive::napi(object, js_name = "Migrations", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "moderation_log")]
#[napi_derive::napi(object, js_name = "ModerationLog")]
#[napi_derive::napi(object, js_name = "ModerationLog", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "muted_note")]
#[napi_derive::napi(object, js_name = "MutedNote")]
#[napi_derive::napi(object, js_name = "MutedNote", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "muting")]
#[napi_derive::napi(object, js_name = "Muting")]
#[napi_derive::napi(object, js_name = "Muting", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note")]
#[napi_derive::napi(object, js_name = "Note")]
#[napi_derive::napi(object, js_name = "Note", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_edit")]
#[napi_derive::napi(object, js_name = "NoteEdit")]
#[napi_derive::napi(object, js_name = "NoteEdit", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_favorite")]
#[napi_derive::napi(object, js_name = "NoteFavorite")]
#[napi_derive::napi(object, js_name = "NoteFavorite", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_reaction")]
#[napi_derive::napi(object, js_name = "NoteReaction")]
#[napi_derive::napi(object, js_name = "NoteReaction", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_thread_muting")]
#[napi_derive::napi(object, js_name = "NoteThreadMuting")]
#[napi_derive::napi(object, js_name = "NoteThreadMuting", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_unread")]
#[napi_derive::napi(object, js_name = "NoteUnread")]
#[napi_derive::napi(object, js_name = "NoteUnread", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_watching")]
#[napi_derive::napi(object, js_name = "NoteWatching")]
#[napi_derive::napi(object, js_name = "NoteWatching", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "notification")]
#[napi_derive::napi(object, js_name = "Notification")]
#[napi_derive::napi(object, js_name = "Notification", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "page")]
#[napi_derive::napi(object, js_name = "Page")]
#[napi_derive::napi(object, js_name = "Page", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "page_like")]
#[napi_derive::napi(object, js_name = "PageLike")]
#[napi_derive::napi(object, js_name = "PageLike", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "password_reset_request")]
#[napi_derive::napi(object, js_name = "PasswordResetRequest")]
#[napi_derive::napi(object, js_name = "PasswordResetRequest", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "poll")]
#[napi_derive::napi(object, js_name = "Poll")]
#[napi_derive::napi(object, js_name = "Poll", use_nullable = true)]
pub struct Model {
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
pub note_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "poll_vote")]
#[napi_derive::napi(object, js_name = "PollVote")]
#[napi_derive::napi(object, js_name = "PollVote", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "promo_note")]
#[napi_derive::napi(object, js_name = "PromoNote")]
#[napi_derive::napi(object, js_name = "PromoNote", use_nullable = true)]
pub struct Model {
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
pub note_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "promo_read")]
#[napi_derive::napi(object, js_name = "PromoRead")]
#[napi_derive::napi(object, js_name = "PromoRead", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "registration_ticket")]
#[napi_derive::napi(object, js_name = "RegistrationTicket")]
#[napi_derive::napi(object, js_name = "RegistrationTicket", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "registry_item")]
#[napi_derive::napi(object, js_name = "RegistryItem")]
#[napi_derive::napi(object, js_name = "RegistryItem", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "relay")]
#[napi_derive::napi(object, js_name = "Relay")]
#[napi_derive::napi(object, js_name = "Relay", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "renote_muting")]
#[napi_derive::napi(object, js_name = "RenoteMuting")]
#[napi_derive::napi(object, js_name = "RenoteMuting", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "reply_muting")]
#[napi_derive::napi(object, js_name = "ReplyMuting")]
#[napi_derive::napi(object, js_name = "ReplyMuting", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "signin")]
#[napi_derive::napi(object, js_name = "Signin")]
#[napi_derive::napi(object, js_name = "Signin", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "sw_subscription")]
#[napi_derive::napi(object, js_name = "SwSubscription")]
#[napi_derive::napi(object, js_name = "SwSubscription", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "used_username")]
#[napi_derive::napi(object, js_name = "UsedUsername")]
#[napi_derive::napi(object, js_name = "UsedUsername", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub username: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user")]
#[napi_derive::napi(object, js_name = "User")]
#[napi_derive::napi(object, js_name = "User", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group")]
#[napi_derive::napi(object, js_name = "UserGroup")]
#[napi_derive::napi(object, js_name = "UserGroup", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_invitation")]
#[napi_derive::napi(object, js_name = "UserGroupInvitation")]
#[napi_derive::napi(object, js_name = "UserGroupInvitation", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_invite")]
#[napi_derive::napi(object, js_name = "UserGroupInvite")]
#[napi_derive::napi(object, js_name = "UserGroupInvite", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_joining")]
#[napi_derive::napi(object, js_name = "UserGroupJoining")]
#[napi_derive::napi(object, js_name = "UserGroupJoining", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_ip")]
#[napi_derive::napi(object, js_name = "UserIp")]
#[napi_derive::napi(object, js_name = "UserIp", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_keypair")]
#[napi_derive::napi(object, js_name = "UserKeypair")]
#[napi_derive::napi(object, js_name = "UserKeypair", use_nullable = true)]
pub struct Model {
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_list")]
#[napi_derive::napi(object, js_name = "UserList")]
#[napi_derive::napi(object, js_name = "UserList", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_list_joining")]
#[napi_derive::napi(object, js_name = "UserListJoining")]
#[napi_derive::napi(object, js_name = "UserListJoining", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_note_pining")]
#[napi_derive::napi(object, js_name = "UserNotePining")]
#[napi_derive::napi(object, js_name = "UserNotePining", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_pending")]
#[napi_derive::napi(object, js_name = "UserPending")]
#[napi_derive::napi(object, js_name = "UserPending", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_profile")]
#[napi_derive::napi(object, js_name = "UserProfile")]
#[napi_derive::napi(object, js_name = "UserProfile", use_nullable = true)]
pub struct Model {
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_publickey")]
#[napi_derive::napi(object, js_name = "UserPublickey")]
#[napi_derive::napi(object, js_name = "UserPublickey", use_nullable = true)]
pub struct Model {
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_security_key")]
#[napi_derive::napi(object, js_name = "UserSecurityKey")]
#[napi_derive::napi(object, js_name = "UserSecurityKey", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "webhook")]
#[napi_derive::napi(object, js_name = "Webhook")]
#[napi_derive::napi(object, js_name = "Webhook", use_nullable = true)]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,

View file

@ -1,4 +1,4 @@
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct Acct {
pub username: String,
pub host: Option<String>,

View file

@ -5,7 +5,7 @@ use once_cell::sync::Lazy;
use regex::Regex;
use sea_orm::prelude::*;
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct NoteLike {
pub file_ids: Vec<String>,
pub user_id: Option<String>,

View file

@ -1,6 +1,6 @@
use napi;
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct Post {
pub text: Option<String>,
pub cw: Option<String>,

View file

@ -41,7 +41,7 @@ pub async fn fetch_meta(conn: &JsDbConn, invalidate_cache: Option<bool>) -> napi
Ok(meta)
}
#[napi_derive::napi(object)]
#[napi_derive::napi(object, use_nullable = true)]
pub struct PugArgs {
pub img: Option<String>,
pub title: String,